Mvc\Model\ValidatorInterface

Source on GitHub Methods abstract public getMessages () ... abstract public validate (Phalcon\Mvc\EntityInterface $record) ...

Mvc\Model\ValidatorInterface::validate

abstract public validate (Phalcon\Mvc\EntityInterface $record) ...

Mvc\Model\ValidatorInterface::getMessages

abstract public getMessages () ...

Mvc\Model\Validator\Email

extends abstract class Phalcon\Mvc\Model\Validator implements Phalcon\Mvc\Model\ValidatorInterface Source on GitHub Allows to validate if email fields has correct values use Phalcon\Mvc\Model\Validator\Email as EmailValidator; class Subscriptors extends \Phalcon\Mvc\Model { public function validation() { $this->validate(new EmailValidator(array( 'field' => 'electronic_mail' ))); if ($this->validationHasFailed() == true)

Mvc\Model\Validator

Source on GitHub This is a base class for Phalcon\Mvc\Model validators Methods public __construct (array $options) Phalcon\Mvc\Model\Validator constructor protected appendMessage (string $message, [string | array $field], [string $type]) Appends a message to the validator public getMessages () Returns messages generated by the validator public array getOptions () Returns all the options from the validator public getOption (mixed $option, [mixed $defaultValue]) Returns an option public isSetOpti

Mvc\Model\ValidationFailed::getModel

public getModel () Returns the model that generated the messages

Mvc\Model\ValidationFailed::getMessages

public getMessages () Returns the complete group of messages produced in the validation

Mvc\Model\Validator::getOption

public getOption (mixed $option, [mixed $defaultValue]) Returns an option

Mvc\Model\Validator::getMessages

public getMessages () Returns messages generated by the validator

Mvc\Model\Validator::getOptions

public array getOptions () Returns all the options from the validator