You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parameter Field must not be required, since RuleForEach with NotEmpty/NotNull of FluentValidator not restricting accepting null Field array.
The text was updated successfully, but these errors were encountered:
baguwka
changed the title
RuleForEach on array properties marks array property as Required
RuleForEach with NotEmpty/NotNull on array properties marks array property as Required
Oct 27, 2022
Hello
I've noticed a possible issue with
RuleForEach
for array fields of query parameters.Here is an example with the behavior I reproduced:
https://github.com/baguwka/swashbuckle.validation.issue.ruleforeach/blob/master/RuleForEachValidation/Controller.cs
Dto
Controller
Validator
Actual swagger scheme
Parameter
Field
must not be required, sinceRuleForEach
withNotEmpty/NotNull
of FluentValidator not restricting acceptingnull
Field array.The text was updated successfully, but these errors were encountered: