public function setRegularExpression(string $elementName, string $regularExpression, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = __('ivopetkov.form.This is not a valid value.');
        }
        $this->data[] = ['regExp', $errorMessage, $elementName, $regularExpression];
        return $this;
    }
public function setRegularExpression(string $elementName, string $regularExpression, string $errorMessage = null): \IvoPetkov\BearFrameworkAddons\Form\Constraints
    {
        if ($errorMessage === null) {
            $errorMessage = __('ivopetkov.form.This is not a valid value.');
        }
        $this->data[] = ['regExp', $errorMessage, $elementName, $regularExpression];
        return $this;
    }
public function setRegularExpression ( string $ elementName , string $ regularExpression , string $ errorMessage = null ) : \ IvoPetkov \ BearFrameworkAddons \ Form \ Constraints { if ( $ errorMessage === null ) { $ errorMessage = __ ( 'ivopetkov.form.This is not a valid value.' ) ; } $ this -> data [ ] = [ 'regExp' , $ errorMessage , $ elementName , $ regularExpression ] ; return $ this ; }
Performs a regular expression validation

@param string $elementName The element name
@param string $regularExpression
@param string $errorMessage Error message
@return \IvoPetkov\BearFrameworkAddons\Form\Constraints Returns a reference to itself.
Performs a regular expression validation