v9
Question
All hi, I want to validate the enclosed optional parameter how I can make it?
I have a field arr [1,2, 3] - this parameter not obligatory, and I need to check enclosure in this massif, but this massif not obligatory, now after dock I can make only this way: validate: "required, dive, required"' and the field arr obligatory has to be, and at me on a task not obligatory how to make check on enclosure without check on presence of the field?
Hey @AlexMain
If I understand you correctly, you only want to validate the array if it’s present.
I think you’re looking for validate:”omitempty,dive,required”
Please let me know if this is what you’re looking for :)
Thanks, it's work.
helpful tip :) I think it will be great if you can add it to the docs
Most helpful comment
Hey @AlexMain
If I understand you correctly, you only want to validate the array if it’s present.
I think you’re looking for
validate:”omitempty,dive,required”Please let me know if this is what you’re looking for :)