Flikore Validator
  • Api
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • Flikore
    • Validator
      • Exception
      • Interfaces
      • Intl
      • Validators

Classes

  • ValidationChoice
  • ValidationCombo
  • ValidationKey
  • ValidationSet
  • ValidationValue
  • Validator

Class ValidationCombo

Combines two or more validator objects into one. This validates with all the inserted validators and stops at the first error, return the message of the validator that went wrong.

Flikore\Validator\Validator implements Flikore\Validator\Interfaces\IValidator
Extended by Flikore\Validator\ValidationCombo
Namespace: Flikore\Validator
Package: Flikore\Validator
Copyright: (c) 2014, George Marques
License: MIT
Author: George Marques <george at georgemarques.com.br>
Version: 0.5.2
Since: 0.2
Located at Flikore/Validator/ValidationCombo.php

Methods summary

public
# __construct( )

Creates a new Validation Combo. You can pass as many validators as you want.

Creates a new Validation Combo. You can pass as many validators as you want.

public
# addValidator( Flikore\Validator\Validator $validator )

Adds a new validator to the combo.

Adds a new validator to the combo.

Parameters

$validator
Flikore\Validator\Validator
$validator The validator to add.
protected boolean
# doValidate( mixed $value )

Executes the real validation so it can be reused.

Executes the real validation so it can be reused.

Parameters

$value
mixed
$value The value to validate.

Returns

boolean
Whether the value pass the validation.
public
# addKeyValue( string $key, string $value )

Adds a new key-value pair to be replaced by the templating engine. This does not check if it's replacing a specific validator value.

Adds a new key-value pair to be replaced by the templating engine. This does not check if it's replacing a specific validator value.

Parameters

$key
string
$key The key to replace (in the template as "%key%")
$value
string
$value The value to be inserted instead of the key.

Overrides

Flikore\Validator\Validator::addKeyValue

Methods inherited from Flikore\Validator\Validator

applyTemplate(), assert(), getErrorMessage(), isEmpty(), setErrorMessage(), validate()

Magic methods summary

Properties summary

protected string $message
#

The error message for this validator.

The error message for this validator.

protected Flikore\Validator\Validator[] $validators
#

A collection of all validators.

A collection of all validators.

Properties inherited from Flikore\Validator\Validator

$values

Flikore Validator API documentation generated by ApiGen 2.8.0