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
Currently validation side-effects are done in Field; that is, S.error is invoked during field handling. It may be worth considering pushing that into the form, so that the field simply returns a Box potentially including its error data, and the form submission handler is charged with invoking S.error. This would make it easier for the invoker to change the behavior (e.g., by not invoking S.error but marking the errors on the client differently, for example). It would also separate concerns a bit better, allowing the field to be solely charged with coordinating the field data, and not with marking the validation error in a client-specific way.
The text was updated successfully, but these errors were encountered:
Currently validation side-effects are done in
Field
; that is,S.error
is invoked during field handling. It may be worth considering pushing that into the form, so that the field simply returns aBox
potentially including its error data, and the form submission handler is charged with invokingS.error
. This would make it easier for the invoker to change the behavior (e.g., by not invokingS.error
but marking the errors on the client differently, for example). It would also separate concerns a bit better, allowing the field to be solely charged with coordinating the field data, and not with marking the validation error in a client-specific way.The text was updated successfully, but these errors were encountered: