Skip to content

Commit

Permalink
include {min|max}Items validation in rust-server models (#17201)
Browse files Browse the repository at this point in the history
  • Loading branch information
vances committed Nov 29, 2023
1 parent fb429f7 commit 14c12fc
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,19 @@ pub struct {{{classname}}} {
range(min = {{minimum}}),
{{/maximum}}
{{/minimum}}
{{#maxItems}}
{{#minItems}}
length(min = {{minItems}}, max = {{maxLength}}),
{{/minItems}}
{{^minItems}}
length(max = {{maxItems}}),
{{/minItems}}
{{/maxItems}}
{{^maxItems}}
{{#minItems}}
length(min = {{minItems}}),
{{/minItems}}
{{/maxItems}}
)]
{{/hasValidation}}
{{#required}}
Expand Down

0 comments on commit 14c12fc

Please sign in to comment.