PHP Interface Webiny\Component\Validation\ValidatorInterface

Mostra file Open project: Webiny/Framework Interface Usage Examples

Public Methods

Method Description
getName ( ) : string Get validator name, eg: email
validate ( mixed $value, array $params = [], boolean | true $throw = true ) : boolean | string Validate given value, using optional parameters and either throw an exception or return a boolean

Method Details

getName() public method

Get validator name, eg: email
public getName ( ) : string
return string

validate() public method

Validate given value, using optional parameters and either throw an exception or return a boolean
public validate ( mixed $value, array $params = [], boolean | true $throw = true ) : boolean | string
$value mixed
$params array
$throw boolean | true
return boolean | string