PHP Class Bluz\Validator\Rule\AbstractRule

Author: Anton Shevchuk
Show file Open project: bluzphp/framework

Protected Properties

Property Type Description
$template string Template for error output - {{name}} - name of field - {{input}} - input value

Public Methods

Method Description
__invoke ( mixed $input ) : boolean Invoke
__toString ( ) : string Cast to string
assert ( string $input ) : boolean Assert
getTemplate ( ) : string Get error template
validate ( mixed $input ) : boolean Check input data

Method Details

__invoke() public method

Invoke
public __invoke ( mixed $input ) : boolean
$input mixed
return boolean

__toString() public method

Cast to string
public __toString ( ) : string
return string

assert() public method

Assert
public assert ( string $input ) : boolean
$input string
return boolean

getTemplate() public method

Get error template
public getTemplate ( ) : string
return string

validate() abstract public method

Check input data
abstract public validate ( mixed $input ) : boolean
$input mixed
return boolean

Property Details

$template protected property

Template for error output - {{name}} - name of field - {{input}} - input value
protected string $template
return string