PHP Trait Api\StarterKit\Utils\ApiValidatesRequests

Datei anzeigen Open project: qijitech/api-starter-kit

Public Methods

Method Description
validate ( Illuminate\Http\Request $request, array $rules, array $messages = [], array $customAttributes = [] ) : void Validate the given request with the given rules.

Protected Methods

Method Description
formatValidationErrors ( Illuminate\Validation\Validator $validator ) : array Format the validation errors to be returned.
getValidationFactory ( ) : Illuminate\Contracts\Validation\Factory Get a validation factory instance.

Method Details

formatValidationErrors() protected method

Format the validation errors to be returned.
protected formatValidationErrors ( Illuminate\Validation\Validator $validator ) : array
$validator Illuminate\Validation\Validator
return array

getValidationFactory() protected method

Get a validation factory instance.
protected getValidationFactory ( ) : Illuminate\Contracts\Validation\Factory
return Illuminate\Contracts\Validation\Factory

validate() public method

Validate the given request with the given rules.
public validate ( Illuminate\Http\Request $request, array $rules, array $messages = [], array $customAttributes = [] ) : void
$request Illuminate\Http\Request
$rules array
$messages array
$customAttributes array
return void