Documentation

Abstract class Phalcon\Validation\Validator

implements Phalcon\Validation\ValidatorInterface

Source on GitHub

This is a base class for validators

Methods

public __construct ([array $options])

Phalcon\Validation\Validator constructor

public mixed isSetOption (string $key)

Checks if an option is defined

public mixed getOption (string $key)

Returns an option in the validator’s options Returns null if the option hasn’t been set

public setOption (string $key, mixed $value)

Sets an option in the validator

public mixed getType ()

Gets an type in the validator

abstract public boolean validate (Phalcon\ValidationInterface $validator, string|array $attribute, [unknown $allowEmpty]) inherited from Phalcon\Validation\ValidatorInterface

Executes the validation

abstract public boolean valid () inherited from Phalcon\Validation\ValidatorInterface

Executes the validation