public function setEmail(string $elementName, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = __('ivopetkov.form.This is not a valid email address.');
        }
        $this->data[] = ['email', $errorMessage, $elementName];
        return $this;
    }
public function setEmail(string $elementName, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = __('ivopetkov.form.This is not a valid email address.');
        }
        $this->data[] = ['email', $errorMessage, $elementName];
        return $this;
    }
public function setEmail ( string $ elementName , string $ errorMessage = null ) : \ IvoPetkov \ BearFrameworkAddons \ Form \ Constraints { if ( $ errorMessage === null ) { $ errorMessage = __ ( 'ivopetkov.form.This is not a valid email address.' ) ; } $ this -> data [ ] = [ 'email' , $ errorMessage , $ elementName ] ; return $ this ; }
Requires the element value to be a valid email address

@param string $elementName The element name
@param string $errorMessage Error message
@return \IvoPetkov\BearFrameworkAddons\Form\Constraints Returns a reference to itself.
Requires the element value to be a valid email address