| @@ 92-101 (lines=10) @@ | ||
| 89 | } |
|
| 90 | } |
|
| 91 | ||
| 92 | private function checkMaxLength($v) |
|
| 93 | { |
|
| 94 | $stringLen = strlen($v); |
|
| 95 | if ($this->maxLength != null) { |
|
| 96 | if ($stringLen < $this->maxLength) { |
|
| 97 | throw new \InvalidArgumentException( |
|
| 98 | "the provided value for " . __CLASS__ . " is to short MaxLength: " |
|
| 99 | . $this->maxLength |
|
| 100 | ); |
|
| 101 | } |
|
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| @@ 105-114 (lines=10) @@ | ||
| 102 | } |
|
| 103 | } |
|
| 104 | ||
| 105 | private function checkMinLength($v) |
|
| 106 | { |
|
| 107 | $stringLen = strlen($v); |
|
| 108 | if ($this->minLength != null) { |
|
| 109 | if ($stringLen > $this->minLength) { |
|
| 110 | throw new \InvalidArgumentException( |
|
| 111 | "the provided value for " . __CLASS__ . " is to long minLength: " |
|
| 112 | . $this->minLength |
|
| 113 | ); |
|
| 114 | } |
|
| 115 | } |
|
| 116 | } |
|
| 117 | ||