class Validator

Supports operations for the make:validator command.

Constants

private VALIDATOR_PATH

Path to custom form validators.

Methods

static int
makeValidator(string $validatorName)

Generates a new user defined validator class.

static string
validatorTemplate(string $validatorName)

Returns a string containing the structure for the new custom validator class with the name of the validator as the only parameter.

Details

at line 18
static int makeValidator(string $validatorName)

Generates a new user defined validator class.

Parameters

string $validatorName

Name for new validator class.

Return Value

int

A value that indicates success, invalid, or failure.

at line 35
static private string validatorTemplate(string $validatorName)

Returns a string containing the structure for the new custom validator class with the name of the validator as the only parameter.

Parameters

string $validatorName

The name for the new custom validator class.

Return Value

string

The contents for the new custom validator class.