Regular expression validation.

Supports following options:

- pattern  (string)  The regular expression pattern
package CONTENIDO Validator

 Methods

Returns list of validations errors

getErrors() : array
Inherited
inherited_from \cValidatorAbstract::getErrors()

Returns

array

Option getter.

getOption(string $name) : mixed | null
Inherited
inherited_from \cValidatorAbstract::getOption()

Parameters

$name

string

Returns

mixednull

Validates the passed value.

isValid(mixed $value) : bool
Inherited
inherited_from \cValidatorAbstract::isValid()

Parameters

$value

mixed

Returns

bool

Single option setter.

setOption(string $name, mixed $value) 
Inherited
inherited_from \cValidatorAbstract::setOption()

Parameters

$name

string

$value

mixed

Options setter, merges passed options with previous set options.

setOptions(array $options) 
Inherited
inherited_from \cValidatorAbstract::setOptions()

Parameters

$options

array

Abstract isValid method, which has to be implemented by childs

_isValid(mixed $value) : bool

Parameters

$value

mixed

Returns

bool

Adds a error.

addError(string $message, mixed $code) 
Inherited
inherited_from \cValidatorAbstract::addError()

Parameters

$message

string

$code

mixed

 Properties

 

$_errors : array
Inherited
inherited_from \cValidatorAbstract::$$_errors
 

$_options : array
Inherited
inherited_from \cValidatorAbstract::$$_options