@@ 83-85 (lines=3) @@ | ||
80 | ||
81 | if (!isset($this->validators[$type])) { |
|
82 | $result = Validators::is($value, $rule); |
|
83 | if (!$result) { |
|
84 | $this->errors[] = 'Validation for ' . $validation->getKey() . '(' . $value . ') failed | ' . $rule; |
|
85 | } |
|
86 | continue; |
|
87 | } |
|
88 | ||
@@ 91-93 (lines=3) @@ | ||
88 | ||
89 | if (strpos($rule, ':') === false) { |
|
90 | $result = call_user_func($this->validators[$rule], $value); |
|
91 | if (!$result) { |
|
92 | $this->errors[] = 'Validation for ' . $validation->getKey() . '(' . $value . ') failed | ' . $rule; |
|
93 | } |
|
94 | continue; |
|
95 | } else { |
|
96 | list($type, $ruleParams) = explode(':', $rule, 2); |
|
@@ 101-103 (lines=3) @@ | ||
98 | 'value' => $value, |
|
99 | 'ruleParams' => $ruleParams |
|
100 | ]); |
|
101 | if (!$result) { |
|
102 | $this->errors[] = 'Validation for ' . $validation->getKey() . '(' . $value . ') failed | ' . $rule; |
|
103 | } |
|
104 | continue; |
|
105 | } |
|
106 | } |