@@ 220-229 (lines=10) @@ | ||
217 | ]); |
|
218 | } |
|
219 | } |
|
220 | if ( |
|
221 | isset($constraints->minimum) |
|
222 | && !$this->checkMinimumConstraint($val, $this->castValueNoConstraints($constraints->minimum)) |
|
223 | ) { |
|
224 | $validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [ |
|
225 | "field" => $this->name(), |
|
226 | "value" => $val, |
|
227 | "error" => "value is below minimum" |
|
228 | ]); |
|
229 | } |
|
230 | if ( |
|
231 | isset($constraints->maximum) |
|
232 | && !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum)) |
|
@@ 230-239 (lines=10) @@ | ||
227 | "error" => "value is below minimum" |
|
228 | ]); |
|
229 | } |
|
230 | if ( |
|
231 | isset($constraints->maximum) |
|
232 | && !$this->checkMaximumConstraint($val, $this->castValueNoConstraints($constraints->maximum)) |
|
233 | ) { |
|
234 | $validationErrors[] = new SchemaValidationError(SchemaValidationError::FIELD_VALIDATION, [ |
|
235 | "field" => $this->name(), |
|
236 | "value" => $val, |
|
237 | "error" => "value is above maximum" |
|
238 | ]); |
|
239 | } |
|
240 | if ( |
|
241 | isset($constraints->minLength) && !$this->checkMinLengthConstraint($val, $constraints->minLength) |
|
242 | ) { |