src/Charcoal/Property/StringProperty.php
public function validateRegexp()
    {
        $val = $this->val();

        $regexp = $this->regexp();
        if ($regexp == '') {
            return true;
        }

        $valid = !!preg_match($regexp, $val);
        if (!$valid) {
            $this->validator()->error('Regexp error', 'regexp');
        }

        return $valid;
    }
public function validateRegexp()
    {
        $val = $this->val();

        $regexp = $this->regexp();
        if ($regexp == '') {
            return true;
        }

        $valid = !!preg_match($regexp, $val);
        if (!$valid) {
            $this->validator()->error('Regexp error', 'regexp');
        }

        return $valid;
    }
public function validateRegexp ( ) { $ val = $ this -> val ( ) ; $ regexp = $ this -> regexp ( ) ; if ( $ regexp == '' ) { return true ; } $ valid = ! ! preg_match ( $ regexp , $ val ) ; if ( ! $ valid ) { $ this -> validator ( ) -> error ( 'Regexp error' , 'regexp' ) ; } return $ valid ; }
Validate if the property's value matches the regular expression.

@return boolean
Validate if the property s value matches the regular expression .