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
Similar to something like Laravel's bail. There are a few ways we could go about implementing it from a syntax standpoint. Laravel has chosen (and we've largely mirrored) to use rules, or almost pseudo-rules to allow modification of the validation "runtime" examples: bail and sometimes
required|bail|between:0,100
This keeps the syntax all familiar – although I've always found these "modifiers" a little opaque to read. Are they sequential? global (they are global), etc.
I think we could keep this mirroring, but I wonder if there's any appetite for a modifier on a rule. Possible syntax:
validation="^required|between:0,100"
In this case, the rest of the validation rules would run only if required passes, but if it does the rest of the rules would run even if one of them fails (not just first failure like bail).
The text was updated successfully, but these errors were encountered:
Similar to something like Laravel's
bail
. There are a few ways we could go about implementing it from a syntax standpoint. Laravel has chosen (and we've largely mirrored) to use rules, or almost pseudo-rules to allow modification of the validation "runtime" examples:bail
andsometimes
This keeps the syntax all familiar – although I've always found these "modifiers" a little opaque to read. Are they sequential? global (they are global), etc.
I think we could keep this mirroring, but I wonder if there's any appetite for a modifier on a rule. Possible syntax:
In this case, the rest of the validation rules would run only if required passes, but if it does the rest of the rules would run even if one of them fails (not just first failure like
bail
).The text was updated successfully, but these errors were encountered: