Class ValidationValue
This class can be used as a validation rule in a set to use the fields from the object being validate as an input to the constructor of a validator. This delegates the proper construction of the validation until there are an object to validate.
Package: Flikore\Validator
Copyright: (c) 2014, George Marques
License: MIT
Author: George Marques <george at georgemarques.com.br>
Version: 0.5.2
Since: 0.4.0
Located at Flikore/Validator/ValidationValue.php
Methods summary
public
|
#
__construct( string|
Creates a new validation value for a validation set. |
public
|
#
addKeyValue( string $key, mixed $value )
Adds a new key-value pair to be replaced by the templating engine of the generated validator. This does not check if it's replacing a specific validator value. |
public
|
|
public
|
#
createRule( array $fields )
Creates a new concrete validator rule based on the given array. Such array is created automatically by ValidationSet. |
public
array
|
Magic methods summary
Properties summary
protected
string
|
$validator |
#
The validator to build. |
protected
array
|
$args |
#
The arguments to the validator constructor. |
protected
array
|
$fields |
#
A list of fields to fecth from the validated object. |
protected
string
|
$message |
#
The error message to the generated validator. |
protected
array
|
$values |
#
The key-value pairs to insert in the generated validator. |