src/validator/ArraylengthValidator.class.php 2 locations
|
@@ 94-97 (lines=4) @@
|
| 91 |
|
|
| 92 |
|
$count = count($data); |
| 93 |
|
|
| 94 |
|
if ($this->hasParameter('min') && $count < $this->getParameter('min')) { |
| 95 |
|
$this->throwError('min'); |
| 96 |
|
return false; |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
if ($this->hasParameter('max') && $count > $this->getParameter('max')) { |
| 100 |
|
$this->throwError('max'); |
|
@@ 99-102 (lines=4) @@
|
| 96 |
|
return false; |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
if ($this->hasParameter('max') && $count > $this->getParameter('max')) { |
| 100 |
|
$this->throwError('max'); |
| 101 |
|
return false; |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
return true; |
| 105 |
|
} |
src/validator/BaseFileValidator.class.php 1 location
|
@@ 105-108 (lines=4) @@
|
| 102 |
|
$this->throwError('min_size'); |
| 103 |
|
return false; |
| 104 |
|
} |
| 105 |
|
if ($this->hasParameter('max_size') && $size > $this->getParameter('max_size')) { |
| 106 |
|
$this->throwError('max_size'); |
| 107 |
|
return false; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
if ($this->hasParameter('extension')) { |
| 111 |
|
$fileinfo = pathinfo($file->getName()) + array('extension' => ''); |
src/validator/NumberValidator.class.php 2 locations
|
@@ 105-108 (lines=4) @@
|
| 102 |
|
} |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
if ($this->hasParameter('min') && $parsedValue < $this->getParameter('min')) { |
| 106 |
|
$this->throwError('min'); |
| 107 |
|
return false; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
if ($this->hasParameter('max') && $parsedValue > $this->getParameter('max')) { |
| 111 |
|
$this->throwError('max'); |
|
@@ 110-113 (lines=4) @@
|
| 107 |
|
return false; |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
if ($this->hasParameter('max') && $parsedValue > $this->getParameter('max')) { |
| 111 |
|
$this->throwError('max'); |
| 112 |
|
return false; |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
switch (strtolower($this->getParameter('cast_to', $this->getParameter('type')))) { |
| 116 |
|
case 'int': |