mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-31 07:01:54 +00:00
Fixed hasRule() method.
This commit is contained in:
parent
725418b23a
commit
5a10a4fe96
@ -590,8 +590,11 @@ class Validator
|
|||||||
protected function hasRule($name, $field)
|
protected function hasRule($name, $field)
|
||||||
{
|
{
|
||||||
foreach($this->_validations as $validation) {
|
foreach($this->_validations as $validation) {
|
||||||
if ($validation['rule'] == $name)
|
if ($validation['rule'] == $name) {
|
||||||
return in_array($field, $validation['fields']);
|
if (in_array($field, $validation['fields'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user