class SpecialCharValidator extends CustomValidator

Child class class that supports ability to check if field contains an special character that is not a space in the field.

Properties

$additionalFieldData from  CustomValidator
$field from  CustomValidator
$includeDeleted from  CustomValidator
$message from  CustomValidator
$rule from  CustomValidator
$success from  CustomValidator

Methods

__construct(object $model, array $params)

Constructor for Custom Validator. It performs checks on the model and params such as fields, rules, and messages. Finally the validation is performed against input from a form. An exception is thrown if any conditions are not satisfied. When an exception is thrown a message is displayed describing the issue.

void
runValidation()

Implements the abstract function of the same name from the parent class. Enforces requirement where a field must contain at least one special character that is not a space.

Details

in CustomValidator at line 33
__construct(object $model, array $params)

Constructor for Custom Validator. It performs checks on the model and params such as fields, rules, and messages. Finally the validation is performed against input from a form. An exception is thrown if any conditions are not satisfied. When an exception is thrown a message is displayed describing the issue.

Parameters

object $model

The name of the model we want to perform validation when submitting a form.

array $params

A list of values obtained from an input when a form is submitted during a post action.

at line 17
void runValidation()

Implements the abstract function of the same name from the parent class. Enforces requirement where a field must contain at least one special character that is not a space.

Return Value

void