Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const handleBlur = async ({ target }) => {
if (canCheck) {
try {
await createYupSchema(type, validations, translatedErrors).validate(
target.value
);
resetError();
} catch (err) {
const { message } = err;
setError(message);
}
}
};