Skip to content

Commit 22951bd

Browse files
authored
Merge pull request laravel#3512 from decadence/patch-1
Change bail example
2 parents 394dc04 + 8d2289a commit 22951bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ As you can see, we simply pass the incoming HTTP request and desired validation
112112
Sometimes you may wish to stop running validation rules on an attribute after the first validation failure. To do so, assign the `bail` rule to the attribute:
113113

114114
$this->validate($request, [
115-
'title' => 'bail|required|unique:posts|max:255',
115+
'title' => 'bail|unique:posts|max:255',
116116
'body' => 'required',
117117
]);
118118

119-
In this example, if the `required` rule on the `title` attribute fails, the `unique` rule will not be checked. Rules will be validated in the order they are assigned.
119+
In this example, if the `unique` rule on the `title` attribute fails, the `max` rule will not be checked. Rules will be validated in the order they are assigned.
120120

121121
#### A Note On Nested Attributes
122122

0 commit comments

Comments
 (0)