Nexista_ValidatorThis class Nexista_is the base class Nexista_upon which to extend custom validators
Located in /kernel/validator.php (line 20)
| Class | Description |
|---|---|
Nexista_RegexValidator
|
This validator is used to check data using a Regular Expression passed as a parameter |
Nexista_GdValidator
|
This validator checks whether the format of the given image is supported by our version of GD. |
Nexista_PhoneValidator
|
This validator is used to check whether or not data is a valid phone number |
Nexista_CustomValidator
|
This validator calls a user defined function to validate the data. |
Nexista_LengthValidator
|
This validator is used to check that a string is under a certain length. |
Nexista_RequiredValidator
|
This validator is used to check whether or data is present. |
Nexista_Nexista_XmlValidator
|
This validator is used to make sure that a string contains is xml safe (i.e all tags close and nest appropriately) It does not check for headers and root tags. |
Nexista_NumericValidator
|
This validator is used to check whether or not data is composed of only numbers. |
Nexista_MatchValidator
|
This validator is used to check whether or not two values are the same. |
Nexista_ValueValidator
|
This validator checks that the data is equal to a certain value (i.e. true) using case insensitve string comparison |
Nexista_AlphaValidator
|
This validator is used to check whether or not data is composed of only letters. |
Nexista_DummyValidator
|
This validator is just a dummy validator. It is used when a field is required but no other validation is needed. |
Nexista_EmailValidator
|
This validator is used to check whether or not data is a valid email address. |
Nexista_AlphanumValidator
|
This validator is used to check whether or not data is composed of only alphanumeric characters. |
boolean
$empty
= false (line 38)
Data existence flag
string
$message
= '' (line 56)
Validation info message
array
$params
= array() (line 65)
Function parameter array
boolean
$required
= true (line 29)
Data requirement flag
boolean
$result
= false (line 47)
Validator result flag
applyParams (line 267)
Load class Nexista_parameters
This function will check if the required parameters for this class Nexista_are supplied and will load them into $this->params array
getMessage (line 248)
Gets a message from validator
isEmpty (line 223)
Gets data existence
isRequired (line 235)
Gets data requirement flag
isValid (line 200)
Gets validator result
main (line 121)
Applies validator
This function should be extended in the custom validators. The function should return true/false for errors. If the item to validate is empty, call the method $this->isEmpty(). Set the property $this->valid to record validator result.
Sample code
process (line 77)
Applies validator and checks requirements
setEmpty (line 211)
Sets data existence to absent
setMessage (line 140)
Sets a message from validator
This function allows a validator to set a text message that can be used to present to the user as error. Please note that this is not the error string itself. These error strings are language dependent and not set by the validator. This is rather some useful information that some validators may provide such as where and what kind of error caused the failure of the validation process.
setRequired (line 152)
Checks item requirements
Documentation generated on Tue, 11 Mar 2008 23:23:15 -0400 for Nexista 0.2.0