Our great sponsors
-
You can find the complete code in this GitHub repo.
-
medusa-starter-default which is the Medusa server. (Do NOT seed your database yet)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
medusa-nextjs-starter which is the Next.js frontend template.
-
We’ll first create the field in the form’s validation schema which is handled by the library Yup. You’ll see the config object already has a value province that is set to be nullable. Let’s change this so it’s now required by removing nullable() and replacing it with required("Required").
Related posts
- Converting React Forms to Formik and Yup
- Crafting Forms in React: Vanilla vs. React Hook Form vs. Formik
- Popular Libraries For Building Type-safe Web Application APIs
- Ask HN: Looking for a project to contribute to? (April 2024)
- Lessons from open-source: Replace zod with superstruct if you do not use zod’s advanced capabilities