ActiveRecord_RegExValidationA validation to check that an attribute's value conforms to a regular expression.
Located in /activerecord/lib/ActiveRecord/Validation.php (line 351)
ActiveRecord_Validation | --ActiveRecord_RegExValidation
ActiveRecord_RegExValidation
__construct
(array $attrNames, string $pattern, [string $msg = false], [bool $allowNull = false], [int $type = ActiveRecord_Validation::ON_SAVE], [string $condition = false])
mixed
$allowNull
(line 367)
Flag indicating whether nulls are allowed
mixed
$attrNames
(line 355)
List of attribute names to validate
mixed
$msg
(line 359)
Error message to use
mixed
$pattern
(line 363)
Regular expression to validate against
Inherited from ActiveRecord_Validation
ActiveRecord_Validation::$condition
ActiveRecord_Validation::$type
Constructor __construct (line 379)
Constructor
validate (line 395)
Validate the object provided. If the object is invalid, it is the responsibility of this method to add any errors appropriate to the object's error collection.
Inherited From ActiveRecord_Validation
ActiveRecord_Validation::__construct()
ActiveRecord_Validation::should_validate()
ActiveRecord_Validation::validate()
Inherited from ActiveRecord_Validation
ActiveRecord_Validation::ON_CREATE
ActiveRecord_Validation::ON_SAVE
ActiveRecord_Validation::ON_UPDATE
Documentation generated on Wed, 25 Apr 2012 09:46:46 -0700 by phpDocumentor 1.4.3