Skip to content

Commit 2aa5ea8

Browse files
committed
fix bug
1 parent 2237669 commit 2aa5ea8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Illuminate/Validation/Validator.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,10 @@ protected function validateAttribute($attribute, $rule)
335335
// attribute is invalid and we will add a failure message for this failing attribute.
336336
$validatable = $this->isValidatable($rule, $attribute, $value);
337337

338-
if ($validatable && $rule instanceof RuleContract) {
339-
return $this->validateUsingCustomRule($attribute, $value, $rule);
338+
if ($rule instanceof RuleContract) {
339+
return $validatable
340+
? $this->validateUsingCustomRule($attribute, $value, $rule)
341+
: null;
340342
}
341343

342344
$method = "validate{$rule}";

0 commit comments

Comments
 (0)