Validation\Validator\Alnum

extends abstract class Phalcon\Validation\Validator implements Phalcon\Validation\ValidatorInterface Source on GitHub Check for alphanumeric character(s) use Phalcon\Validation\Validator\Alnum as AlnumValidator; $validator->add('username', new AlnumValidator([ 'message' => ':field must contain only alphanumeric characters' ])); $validator->add(['username', 'name'], new AlnumValidator([ 'message' => [ 'username' => 'username must contain only alphanumeric c

Validation\ValidatorInterface::validate

abstract public validate (Phalcon\Validation $validation, mixed $attribute) ...

Validation\ValidatorInterface::hasOption

abstract public hasOption (mixed $key) ...

Validation\ValidatorInterface::getOption

abstract public getOption (mixed $key, [mixed $defaultValue]) ...

Validation\ValidatorInterface

Source on GitHub Methods abstract public hasOption (mixed $key) ... abstract public getOption (mixed $key, [mixed $defaultValue]) ... abstract public validate (Phalcon\Validation $validation, mixed $attribute) ...

Validation\Validator::validate

abstract public validate (Phalcon\Validation $validation, mixed $attribute) Executes the validation

Validation\Validator::setOption

public setOption (mixed $key, mixed $value) Sets an option in the validator

Validation\Validator::isSetOption

public isSetOption (mixed $key) Checks if an option has been defined

Validation\Validator::hasOption

public hasOption (mixed $key) Checks if an option is defined

Validation\Validator::getOption

public getOption (mixed $key, [mixed $defaultValue]) Returns an option in the validator’s options Returns null if the option hasn’t set