Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the change with required and bail #2579

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,14 @@ When validating arrays, booleans, integers, numerics, and strings, `null` will n
'string' => 'nullable|max:5',
]);

#### Required does not bail

When combining the `required` rule with other validations, it will now continue executing further validation rules. In 5.2 a validation rule like `required|url` would **not** run the `url` validation but in 5.3 it will. An explicit `bail` is now required for this behavior:

Validate::make($request->all(), [
'link' => 'bail|required|url',
]);

<a name="upgrade-5.2.0"></a>
## Upgrading To 5.2.0 From 5.1

Expand Down