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
How to say if Bar provided then validate it is bigger than e.g. 2 else do not validate as it is optional?
Is my solution the best effort?
I mean if i'm not using validation.When(r.Bar != nil, validation.Required, ...) then it accept 0 value for Bar but that is not my intention!
The text was updated successfully, but these errors were encountered:
Consider this struct:
How to say if
Bar
provided then validate it is bigger than e.g. 2 else do not validate as it is optional?Is my solution the best effort?
I mean if i'm not using
validation.When(r.Bar != nil, validation.Required, ...)
then it accept0
value forBar
but that is not my intention!The text was updated successfully, but these errors were encountered: