| @@ 123-132 (lines=10) @@ | ||
| 120 | $this->isValid($v); |
|
| 121 | } |
|
| 122 | ||
| 123 | private function checkMinLength($v) |
|
| 124 | { |
|
| 125 | $stringLen = strlen($v); |
|
| 126 | if ($this->minLength != null) { |
|
| 127 | if ($stringLen > $this->minLength) { |
|
| 128 | throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to long minLength: " |
|
| 129 | . $this->minLength); |
|
| 130 | } |
|
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | private function checkMaxLength($v) |
|
| 135 | { |
|
| @@ 134-143 (lines=10) @@ | ||
| 131 | } |
|
| 132 | } |
|
| 133 | ||
| 134 | private function checkMaxLength($v) |
|
| 135 | { |
|
| 136 | $stringLen = strlen($v); |
|
| 137 | if ($this->maxLength != null) { |
|
| 138 | if ($stringLen < $this->maxLength) { |
|
| 139 | throw new \InvalidArgumentException("the provided value for " . __CLASS__ . " is to short MaxLength: " |
|
| 140 | . $this->maxLength); |
|
| 141 | } |
|
| 142 | } |
|
| 143 | } |
|
| 144 | ||
| 145 | private function checkEnumeration($v) |
|
| 146 | { |
|