@@ -294,44 +294,44 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par
294294 { {#hasValidation} }
295295{ {#isString} }
296296 { {#maxLength} }
297- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } (mb_strlen($this->container['{ {name} }']) > { {maxLength} })) {
297+ if (!is_null($this->container['{ {name} }']) && (mb_strlen($this->container['{ {name} }']) > { {maxLength} })) {
298298 $invalidProperties [] = " invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}." ;
299299 }
300300
301301 { {/maxLength} }
302302 { {#minLength} }
303- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } (mb_strlen($this->container['{ {name} }']) < { {minLength} })) {
303+ if (!is_null($this->container['{ {name} }']) && (mb_strlen($this->container['{ {name} }']) < { {minLength} })) {
304304 $invalidProperties [] = " invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}." ;
305305 }
306306
307307 { {/minLength} }
308308{ {/isString} }
309309 { {#maximum} }
310- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } ($this->container['{ {name} }'] >{ {#exclusiveMaximum} }={ {/exclusiveMaximum} } { {maximum} })) {
310+ if (!is_null($this->container['{ {name} }']) && ($this->container['{ {name} }'] >{ {#exclusiveMaximum} }={ {/exclusiveMaximum} } { {maximum} })) {
311311 $invalidProperties [] = " invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}." ;
312312 }
313313
314314 { {/maximum} }
315315 { {#minimum} }
316- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } ($this->container['{ {name} }'] <{ {#exclusiveMinimum} }={ {/exclusiveMinimum} } { {minimum} })) {
316+ if (!is_null($this->container['{ {name} }']) && ($this->container['{ {name} }'] <{ {#exclusiveMinimum} }={ {/exclusiveMinimum} } { {minimum} })) {
317317 $invalidProperties [] = " invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}." ;
318318 }
319319
320320 { {/minimum} }
321321 { {#pattern} }
322- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } !preg_match("{ {{pattern} }}", $this->container['{ {name} }'])) {
322+ if (!is_null($this->container['{ {name} }']) && !preg_match("{ {{pattern} }}", $this->container['{ {name} }'])) {
323323 $invalidProperties [] = " invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}." ;
324324 }
325325
326326 { {/pattern} }
327327 { {#maxItems} }
328- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } (count($this->container['{ {name} }']) > { {maxItems} })) {
328+ if (!is_null($this->container['{ {name} }']) && (count($this->container['{ {name} }']) > { {maxItems} })) {
329329 $invalidProperties [] = " invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}." ;
330330 }
331331
332332 { {/maxItems} }
333333 { {#minItems} }
334- if ({ {#notRequiredOrIsNullable } } !is_null($this->container['{ {name} }']) && { {/notRequiredOrIsNullable } } (count($this->container['{ {name} }']) < { {minItems} })) {
334+ if (!is_null($this->container['{ {name} }']) && (count($this->container['{ {name} }']) < { {minItems} })) {
335335 $invalidProperties [] = " invalid value for '{{name}}', number of items must be greater than or equal to {{{minItems}}}." ;
336336 }
337337
0 commit comments