Interactive card details form with React, Formik, Yup, Sass
Design comparison
Solution retrospective
What do you guys think about the responsiveness? What do you think about the visual aspect of the page? does it look good? What are some practices that you think can be improved?
Community feedback
- @duniandewonPosted over 1 year ago
Hi ricardo... I see you have setup your form validation with yup but didn't implement it. You already installed formik so maybe you can do something like this.
const validationSchema = Yup.object().shape({ // Your validation schema }); const { values, errors, touched, handleChange, handleBlur, handleSubmit } = useFormik({ initialValues: { value1: "", value2: "", }, onSubmit: (event) => { // do something here }, validationSchema, });
0@RicardoFuentes437Posted over 1 year ago@duniandewon Hello, thanks for your comment :) i'm sorry but i'm not sure what you mean, i thought i did implement the validation, i named it CardSchema and in this part of the code i pass the schema to Formik
<Formik initialValues={initialValues} validationSchema={CardSchema} onSubmit={async (values) => { submitDetails(); }} >
i even made some tests to see if the error messages show up and they do, do the error messages show on your end?
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord