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
At the moment AsynValidator api doesn't provide a way to deal with Future errors while using ruleField.
It would be nice to give users a possibility to handle error cases somehow similar to regular rule method.
def ruleCatchOnly(...)
def ruleCatchNonFatal(...)
How about something like this?:
def ruleFieldCatchOnly(...)
def ruleFieldCatchNonFatal(...)
If it were possible it would also be nice to give users a possibility to default future error handler for all field validators. With that in mind, the user could handle all errors similarly without additional boilerplate.
Example proposition:
defisUsernameUniquie(username: Username):Future[Boolean] =???defisEmailUnique(email: Email):Future[Boolean] =???implicitvaluserValidator=Validator[User]
.async
.filedErrorHandler(throwable =>"Error ocurred")
.ruleField('username, isUsernameUniquie, "Username not unique")
.ruleField('email, isEmailUnique, "Email not unique)
The text was updated successfully, but these errors were encountered:
At the moment AsynValidator api doesn't provide a way to deal with
Future
errors while usingruleField
.It would be nice to give users a possibility to handle error cases somehow similar to regular
rule
method.def ruleCatchOnly(...)
def ruleCatchNonFatal(...)
How about something like this?:
def ruleFieldCatchOnly(...)
def ruleFieldCatchNonFatal(...)
If it were possible it would also be nice to give users a possibility to default future error handler for all field validators. With that in mind, the user could handle all errors similarly without additional boilerplate.
Example proposition:
The text was updated successfully, but these errors were encountered: