Yup Email Validation Example in React



In this quick example i am going to show how you can validate email field in your react application using yup. In this example i am going to show formik based form and validate email validation using yup. 

Sometime we need to validate email field using yup npm package. In this example you will learn how to validate email field using Yup and formik. You know that yup is a great library to validate any formik form very easily.

Example yup custom email validation:

const validationSchema = Yup.object().shape({
   email: Yup.string().email('Invalid email format').required('Required'),
});

 

Hope it can help you.

 

Facebook Github
A web enthusiastic, self-motivated Full-Stack Web Developer from Dhaka, Bangladesh with experience in developing applications using Laravel Vue and React Js Application.