PHP Class Bluz\Validator\Rule\Contains

Inheritance: extends AbstractRule
Show file Open project: bluzphp/framework Class Usage Examples

Protected Properties

Property Type Description
$containsValue needle for search inside input data (haystack)
$identical strong comparison

Public Methods

Method Description
__construct ( mixed $containsValue, boolean $identical = false ) Setup validation rule
getTemplate ( ) : string Get error template
validate ( string | array $input ) : boolean Check input data

Method Details

__construct() public method

Setup validation rule
public __construct ( mixed $containsValue, boolean $identical = false )
$containsValue mixed
$identical boolean

getTemplate() public method

Get error template
public getTemplate ( ) : string
return string

validate() public method

Check input data
public validate ( string | array $input ) : boolean
$input string | array
return boolean

Property Details

$containsValue protected property

needle for search inside input data (haystack)
protected $containsValue

$identical protected property

strong comparison
protected $identical