core/model/modx/validation/modvalidator.class.php

Show: inherited
Table of Contents

Package
modx  
Subpackage
validation  

\modValidator

Package: modx\validation

Custom validation class for modx

Extend this class to customize the validation process.

Parent(s)
\xPDOValidator

Properties

Propertypublic  $messages= 'array()'
inheritedInherited from: \xPDOValidator::$$messages
Default valuearray()Details
Type
n/a
Inherited_from
\xPDOValidator::$$messages  
Propertypublic  $object= 'null'
inheritedInherited from: \xPDOValidator::$$object
Default valuenullDetails
Type
n/a
Inherited_from
\xPDOValidator::$$object  
Propertypublic  $results= 'array()'
inheritedInherited from: \xPDOValidator::$$results
Default valuearray()Details
Type
n/a
Inherited_from
\xPDOValidator::$$results  

Methods

methodpublic__construct(  $object ) : void
inherited

Inherited from: \xPDOValidator::__construct()
Parameters
Name Type Description
$object
methodpublicaddMessage( string $field, string $name, mixed $message = null ) : void
inherited

Add a validation message to the stack.

Inherited from: \xPDOValidator::addMessage()
Parameters
Name Type Description
$field string

The name of the field the message relates to.

$name string

The name of the rule the message relates to.

$message mixed

An optional message; the name of the rule is used if no message is specified.

methodpublicgetMessages( ) : array
inherited

Get the validation messages generated by validate().

Inherited from: \xPDOValidator::getMessages()
Returns
Type Description
array An array of validation messages.
methodpublicgetResults( ) : array
inherited

Get the validation results generated by validate().

Inherited from: \xPDOValidator::getResults()
Returns
Type Description
array An array of boolean validation results.
methodpublichasMessages( ) : boolean
inherited

Indicates validation messages were generated by validate().

Inherited from: \xPDOValidator::hasMessages()
Returns
Type Description
boolean True if messages were generated.
methodpublicreset( ) : void
inherited

Reset the validation results and messages.

Inherited from: \xPDOValidator::reset()
methodpublicvalidate( array $parameters = array() ) : boolean

Validate a xPDOObject by the parameters specified

Parameters
Name Type Description
$parameters array

An associative array of config parameters.

Returns
Type Description
boolean Either true or false indicating valid or invalid.
Details
Access
public  
Documentation was generated by DocBlox 0.18.1.