| @@ 59-62 (lines=4) @@ | ||
| 56 | return false; | |
| 57 | } | |
| 58 | $length = \mb_strlen($value, $this->encoding); | |
| 59 |         if ($this->length !== null and $this->length != $length) { | |
| 60 | $this->message = 'Invalid string length'; | |
| 61 | return false; | |
| 62 | } | |
| 63 |         if ($this->min !== null and $this->min > $length) { | |
| 64 | $this->message = 'String length is too short'; | |
| 65 | return false; | |
| @@ 63-66 (lines=4) @@ | ||
| 60 | $this->message = 'Invalid string length'; | |
| 61 | return false; | |
| 62 | } | |
| 63 |         if ($this->min !== null and $this->min > $length) { | |
| 64 | $this->message = 'String length is too short'; | |
| 65 | return false; | |
| 66 | } | |
| 67 |         if ($this->max !== null and $this->max < $length) { | |
| 68 | $this->message = 'String length is too long'; | |
| 69 | return false; | |
| @@ 67-70 (lines=4) @@ | ||
| 64 | $this->message = 'String length is too short'; | |
| 65 | return false; | |
| 66 | } | |
| 67 |         if ($this->max !== null and $this->max < $length) { | |
| 68 | $this->message = 'String length is too long'; | |
| 69 | return false; | |
| 70 | } | |
| 71 | return true; | |
| 72 | } | |
| 73 | } | |