As you might know, we can define schema in Joi and then pass the fields object to validate all of them. but some times because of UX requirements, we need to validate fields one by one onBlur AND also at the end, validating them all together.
Is there any standard way in Joi to have both in place? (e.g. any method to extract one validator from the schema and apply it to a specific field).
Also if you know any better package or approach for this, please share.
Seems Joi has a method called extract()
to extract a key and validate only based on that.