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
Bail when the first rule for the entire validation fails.
opts := govalidator.Options{
Request: r // request object
Rules: rules, // rules map
Messages: messages, // custom message map (Optional)
RequiredDefault: true, // all the field to be pass the rules
BailFirstError: true //returns the error bag with only one item
}
The text was updated successfully, but these errors were encountered:
Would it be possible to return the error bag on the first failure as opposed to running all the rules.
example:
The text was updated successfully, but these errors were encountered: