Skip to content

Commit 37cd08f

Browse files
committed
Merge pull request laravel#1357 from aebersold/master
documentation fix on validators
2 parents e531cd6 + 7eb5be7 commit 37cd08f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

laravel/documentation/validation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ Many times, when updating a record, you want to use the unique rule, but exclude
196196

197197
#### Validate that a date attribute is before a given date:
198198

199-
'birthdate' => 'before:1986-28-05';
199+
'birthdate' => 'before:1986-05-28';
200200

201201
#### Validate that a date attribute is after a given date:
202202

203-
'birthdate' => 'after:1986-28-05';
203+
'birthdate' => 'after:1986-05-28';
204204

205205
> **Note:** The **before** and **after** validation rules use the **strtotime** PHP function to convert your date to something the rule can understand.
206206
@@ -450,4 +450,4 @@ Next, let's take our "awesome" rule and define it in our new class:
450450

451451
Notice that the method is named using the **validate_rule** naming convention. The rule is named "awesome" so the method must be named "validate_awesome". This is one way in which registering your custom rules and extending the Validator class are different. Validator classes simply need to return true or false. That's it!
452452

453-
Keep in mind that you'll still need to create a custom message for any validation rules that you create. The method for doing so is the same no matter how you define your rule!
453+
Keep in mind that you'll still need to create a custom message for any validation rules that you create. The method for doing so is the same no matter how you define your rule!

0 commit comments

Comments
 (0)