interface Illuminate / Contracts / Validation / Validator

Validator

Methods

public

validate ( ) : array

Run the validator's rules against its data.

public

validated ( ) : array

Get the attributes and values that were validated.

public

fails ( ) : bool

Determine if the data fails the validation rules.

public

failed ( ) : array

Get the failed validation rules.

public

sometimes ( $attribute , $rules , callable $callback ) : $this

Add conditions to a given field based on a Closure.

Parameters

  • $attribute string|array
  • $rules string|array
  • $callback callable
public

after ( $callback ) : $this

Add an after validation callback.

Parameters

  • $callback callable|string
public

errors ( ) : MessageBag

Get all of the validation error messages.