Skip to content

Commit

Permalink
Remove return statement from closure validation example
Browse files Browse the repository at this point in the history
Doesn't actually make a functional difference, but I think having it there is a bit misleading and can make a reader think they need to return the result of calling `$fail(...)` for the rule to work properly.
  • Loading branch information
adamwathan committed Sep 6, 2018
1 parent d155ce9 commit 35d8881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validation.md
Expand Up @@ -1116,7 +1116,7 @@ If you only need the functionality of a custom rule once throughout your applica
'max:255',
function($attribute, $value, $fail) {
if ($value === 'foo') {
return $fail($attribute.' is invalid.');
$fail($attribute.' is invalid.');
}
},
],
Expand Down

0 comments on commit 35d8881

Please sign in to comment.