29.07.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 381<br />

.<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 />

accepted<br />

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

acceptance.<br />

active_url<br />

The field under validation must be a valid URL according to the checkdnsrr PHP function.<br />

after:date<br />

The field under validation must be a value after a given date. The dates will be passed into the<br />

strtotime PHP function:<br />

.<br />

1 'start_date' => 'required|date|after:tomorrow'<br />

Instead of passing a date string to be evaluated by strtotime, you may specify another field to<br />

compare against the date:<br />

.<br />

1 'finish_date' => 'required|date|after:start_date'<br />

alpha<br />

The field under validation must be entirely alphabetic characters.

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

Saved successfully!

Ooh no, something went wrong!