Checks if validated value matches a specified counterpart.
package | Formagic\Rule |
---|---|
author | Florian Sonnenburg |
since | 0.2.0 First time introduced |
inherited_from | \Formagic_Rule_Abstract |
__construct(array $arguments = array()
)
getMessage() : string
string
Message stringgetName() : string
string
The rule namesetMessage(mixed $message) : \Formagic_Rule_Abstract
Usually a rule will have one error message string that is used if the validation fails. If neccessary, Formagic_Rule_Abstract::_errorMessage can hold other variables, eg. an array of error messages for different outcomes of the validation process.
Implements a fluent interface pattern.
see |
---|
mixed
The error message value.
\Formagic_Rule_Abstract
$this object.validate(string $value) : boolean
Subclasses have to implement their behavior here.
inherited_from | \Formagic_Rule_Abstract::validate() |
---|
string
Value to be checked
boolean
True if the two values are identicalvalidate(string $value) : boolean
Subclasses have to implement their behavior here.
string
The value to be validated.
boolean
The rule check result_init(array $additionalArgs) : void
Supported keys:
inherited_from | \Formagic_Rule_Abstract::_init() |
---|
array
Array of options
\Formagic_Exception |
If key "item" is not provided or has invalid value |
---|
_init(array $arguments) : void
array
Array of arguments passed to __construct()
_isNoUserValue($value) : boolean
The value 0 (zero) for example could be something the user entered willingly and would be skipped from rule checks when using empty().
mixed Value to be checked
boolean
$_comparedItem : \Formagic_Item_Abstract
$_name : string