Phorm/Field/Regex.class.php
/**
	 * Validates that the value matches the regular expression.
	 *
	 * @param string $value
	 * @return null
	 * @throws Phorm_ValidationError
	 */
Validates that the value matches the regular expression.

@param string $value
@return null
@throws Phorm_ValidationError
Validates that the value matches the regular expression . @param string $value @return null @throws Phorm_ValidationError
public function validate($value)
	{
		parent::validate($value);
		if( !filter_var($value, FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $this->regex) ) ) )
		{
			throw new Phorm_ValidationError($this->message);
		}
	}
public function validate ( $ value ) { parent :: validate ( $ value ) ; if ( ! filter_var ( $ value , FILTER_VALIDATE_REGEXP , array ( 'options' => array ( 'regexp' => $ this -> regex ) ) ) ) { throw new Phorm_ValidationError ( $ this -> message ) ; } }
Validates that the value matches the regular expression.
Validates that the value matches the regular expression .