PHP Class FluxBB\Core\Validator

Afficher le fichier Open project: fluxbb/core

Protected Properties

Свойство Type Description
$validation Illuminate\Contracts\Validation\Factory The validator factory instance.

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Validation\Factory $validation ) Create a validator instance.
validate ( Request $request ) : void Validate the given request.

Méthodes protégées

Méthode Description
ensureAllInRules ( array $data ) Make sure all of the keys of the given array exist in our ruleset.
ensureValid ( array $attributes ) Make sure the given attributes comply to our rules.
rules ( ) : array Get the rules to validate against.

Method Details

__construct() public méthode

Create a validator instance.
public __construct ( Illuminate\Contracts\Validation\Factory $validation )
$validation Illuminate\Contracts\Validation\Factory

ensureAllInRules() protected méthode

Make sure all of the keys of the given array exist in our ruleset.
protected ensureAllInRules ( array $data )
$data array

ensureValid() protected méthode

Throws an exception if validation fails.
protected ensureValid ( array $attributes )
$attributes array

rules() abstract protected méthode

Get the rules to validate against.
abstract protected rules ( ) : array
Résultat array

validate() abstract public méthode

Should throw an exception if validation fails.
abstract public validate ( Request $request ) : void
$request FluxBB\Server\Request
Résultat void

Property Details

$validation protected_oe property

The validator factory instance.
protected Factory,Illuminate\Contracts\Validation $validation
Résultat Illuminate\Contracts\Validation\Factory