Yup: How to validate a single field in an existing schema with multiple fields?

Created on 10 Jul 2017  路  1Comment  路  Source: jquense/yup

Sorry about the simple question but I couldn't find a way to validate a single field in a schema because in my application I have two different use case validate the whole object or validate a single field in the schema excluding the other fields how can I do the latter?

Most helpful comment

yup.reach(schema, 'path.to.field').validate(fieldValue)

>All comments

yup.reach(schema, 'path.to.field').validate(fieldValue)

Was this page helpful?
0 / 5 - 0 ratings