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
Which is fine when we have one validation on field. But when there is more than one validator, it would be nice to show user which one is failing eg. have validation message/text.
Each validator would correspond to different message in "keyed" format so it can be passed forward to localization functions.
Validation function could return the errorMessages item as string. Validation needs to be changed. When returned value is typeof string there is error (like current false value), and when there is no error typeof boolean && === true is expected. For validators that are not updated (for backward compatibility) default error message would be used when they return false.
The text was updated successfully, but these errors were encountered:
Current usage:
Which is fine when we have one validation on field. But when there is more than one validator, it would be nice to show user which one is failing eg. have validation message/text.
Proposed new format:
t
is translator function hereEach validator would correspond to different message in "keyed" format so it can be passed forward to localization functions.
Validation function could return the
errorMessages
item as string. Validation needs to be changed. When returned value istypeof string
there is error (like currentfalse
value), and when there is no errortypeof boolean && === true
is expected. For validators that are not updated (for backward compatibility) default error message would be used when they returnfalse
.The text was updated successfully, but these errors were encountered: