06.10.2016 Views

laravel-5

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Validation 498<br />

1 $messages = [<br />

2 'email.required' => 'We need to know your e-mail address!',<br />

3 ];<br />

Specifying Custom Messages In Language Files<br />

In many cases, you may wish to specify your attribute specific custom messages in a language file<br />

instead of passing them directly to the Validator. To do so, add your messages to custom array in<br />

the resources/lang/xx/validation.php language file.<br />

1 'custom' => [<br />

2 'email' => [<br />

3 'required' => 'We need to know your e-mail address!',<br />

4 ],<br />

5 ],<br />

Available Validation Rules<br />

Below is a list of all available validation rules and their function:<br />

A> .collection-method-list > p { A> column-count: 3; -moz-column-count: 3; -webkitcolumn-count:<br />

3; A> column-gap: 2em; -moz-column-gap: 2em; -webkit-column-gap: 2em; A> } A><br />

A> .collection-method-list a { A> display: block; A> }<br />

<br />

<br />

Accepted Active URL After (Date) Alpha Alpha Dash Alpha Numeric Array Before (Date) Between<br />

Boolean Confirmed Date Date Format Different Digits Digits Between Dimensions (Image Files)<br />

Distinct E-Mail Exists (Database) File Filled Image (File) In In Array Integer IP Address JSON Max<br />

MIME Types MIME Type By File Extension Min Nullable Not In Numeric Present Regular Expression<br />

Required Required If Required Unless Required With Required With All Required Without Required<br />

Without All Same Size String Timezone Unique (Database) URL<br />

<br />

accepted<br />

The field under validation must be yes, on, 1, or true. This is useful for validating “Terms of Service”<br />

acceptance.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!