|
@@ 238-247 (lines=10) @@
|
| 235 |
|
]); |
| 236 |
|
} |
| 237 |
|
} |
| 238 |
|
if ( |
| 239 |
|
isset($constraints->minimum) |
| 240 |
|
&& !$this->checkMinimumConstraint($val, $this->castValueNoConstraints($constraints->minimum)) |
| 241 |
|
) { |
| 242 |
|
$validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [ |
| 243 |
|
'field' => $this->name(), |
| 244 |
|
'value' => $val, |
| 245 |
|
'error' => 'value is below minimum', |
| 246 |
|
]); |
| 247 |
|
} |
| 248 |
|
if ( |
| 249 |
|
isset($constraints->maximum) |
| 250 |
|
&& !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum)) |
|
@@ 248-257 (lines=10) @@
|
| 245 |
|
'error' => 'value is below minimum', |
| 246 |
|
]); |
| 247 |
|
} |
| 248 |
|
if ( |
| 249 |
|
isset($constraints->maximum) |
| 250 |
|
&& !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum)) |
| 251 |
|
) { |
| 252 |
|
$validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [ |
| 253 |
|
'field' => $this->name(), |
| 254 |
|
'value' => $val, |
| 255 |
|
'error' => 'value is above maximum', |
| 256 |
|
]); |
| 257 |
|
} |
| 258 |
|
if ( |
| 259 |
|
isset($constraints->minLength) && !$this->checkMinLengthConstraint($val, $constraints->minLength) |
| 260 |
|
) { |