內容目录

上一个主题

< Class Phalcon\Mvc\Model\ValidationFailed

下一个主题

Class Phalcon\Mvc\Model\Validator\Email >

Phalcon玩家群:150237524Phalcon玩家

Abstract class Phalcon\Mvc\Model\Validator

implements Phalcon\Mvc\Model\ValidatorInterface

Source on GitHub

This is a base class for Phalcon\Mvc\Model validators

This class is only for backward compatibility reasons to use with Phalcon\Mvc\Collection. Otherwise please use the validators provided by Phalcon\Validation.

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 isSetOption (mixed $option)

Check whether an option has been defined in the validator options

abstract public validate (Phalcon\Mvc\EntityInterface $record) inherited from Phalcon\Mvc\Model\ValidatorInterface

...