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
validator that only proceeds if the data key exists, only useful for maps
ie
input=%{name: "joe"}rules=%{name: [type: :string],age: [sometimes: true,min: 18]}# passes because age isn't present in input, so no validations are ran for age{:ok,data}=Validate.validate(input,rules)input=%{name: "joe",age: 15}# now the `min` validator runs because age is present in the input{:error,errors}=Validate.validate(input,rules)
The text was updated successfully, but these errors were encountered:
validator that only proceeds if the data key exists, only useful for maps
ie
The text was updated successfully, but these errors were encountered: