ValidatesRequests (Foundation\Validation)

ValidatesRequests

trait ValidatesRequests (View source)

Methods

void validateWith(Validator|array $validator, Request $request = null)

Run the validation routine against the given validator.

void validate(Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

void validateWithBag(string $errorBag, Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

Details

void validateWith(Validator|array $validator, Request $request = null)

Run the validation routine against the given validator.

Parameters

Validator|array $validator
Request $request

Return Value

void

void validate(Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

Parameters

Request $request
array $rules
array $messages
array $customAttributes

Return Value

void

void validateWithBag(string $errorBag, Request $request, array $rules, array $messages = array(), array $customAttributes = array())

Validate the given request with the given rules.

Parameters

string $errorBag
Request $request
array $rules
array $messages
array $customAttributes

Return Value

void

Exceptions

ValidationException

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Validation/ValidatesRequests.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部