Closed andyrichardson closed 3 years ago
When the user submits, it would be useful if they could await any in-progress validation.
In-progress validation only applies to forms using async validation.
const { isValidAsync } = useFormContext(); const handleSubmit = useCallback(async () => { const isValid = await isValidAsync; if (!isValid) { return; // Just return - field will have validation error } // submission logic... }, [isValidAsync]);
Fixed in #296
About
When the user submits, it would be useful if they could await any in-progress validation.
In-progress validation only applies to forms using async validation.