@@ -26,9 +26,10 @@ |
||
26 | 26 | { |
27 | 27 | if (mb_strlen($data, 'UTF-8') <= $this->maxLength) { |
28 | 28 | return new Result(true); |
29 | - } |
|
30 | - else return new Result(false, |
|
29 | + } else { |
|
30 | + return new Result(false, |
|
31 | 31 | new RuleError(RuleErrorCode::TOO_LONG, |
32 | 32 | 'The supplied string is too long')); |
33 | + } |
|
33 | 34 | } |
34 | 35 | } |
35 | 36 | \ No newline at end of file |