Fix bug causing non-required fields to throw errors in Validator class.
This commit is contained in:
parent
89b5ad030e
commit
d0b160c329
|
@ -118,7 +118,7 @@ protected function check($attribute, $rule)
|
|||
|
||||
// No validation will be run for attributes that do not exist unless the rule being validated
|
||||
// is "required" or "accepted". No other rules have implicit "required" checks.
|
||||
if ( ! array_key_exists($attribute, $this->attributes) and ! in_array($rule, array('required', 'accepted')))
|
||||
if ( ! static::validate_required($attribute) and ! in_array($rule, array('required', 'accepted')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue