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
is this issue currently blocking your project? (yes/no): no
is this issue affecting a production system? (yes/no): no
Context
node version: 12.7.0
module version: ^17.1.1
environment (e.g. node, browser, native): node
used with (e.g. hapi application, another framework, standalone, ...): nestjs
any other relevant information:
How can we help?
Hello!
For async validation (e.g check if username is unique in database) you have recommended multiple times to use external() validator, but it's not a good solution! Simply because it offers no context to which field presented the error, and it runs AFTER the rest of the schema has been validated. Or am I missing something in the documentation?
I don't know if this is a design limitation, but it's simply not helpful to developers.
I don't mean to be disrespectful, but such a large library that handles a very important aspect of a server-side app needs to add more consideration to this common use case.
Regards!
The text was updated successfully, but these errors were encountered:
I plan to improve the external user experience in the future. That said, while this is a somewhat common use case, it is still less common than using joi for sync validations and unfortunately in JS you can have both in the same code. This would require duplicating the entire library.
Support plan
Context
How can we help?
Hello!
For async validation (e.g check if username is unique in database) you have recommended multiple times to use external() validator, but it's not a good solution! Simply because it offers no context to which field presented the error, and it runs AFTER the rest of the schema has been validated. Or am I missing something in the documentation?
I don't know if this is a design limitation, but it's simply not helpful to developers.
I don't mean to be disrespectful, but such a large library that handles a very important aspect of a server-side app needs to add more consideration to this common use case.
Regards!
The text was updated successfully, but these errors were encountered: