feature/body #4

Merged
SavioCarvalhoMoraes merged 2 commits from feature/body into development 2023-01-12 18:39:56 +00:00
3 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import React from "react";
import { useFormik } from "formik";
import * as Yup from "yup";
import styles from "./formInput.module.scss";
const FormInput = () => {
@ -12,6 +13,14 @@ const FormInput = () => {
tel: "",
instagram: "",
},
validationSchema: Yup.object({
nome: Yup.string().label("Seu nome completo").required(),
email: Yup.string().email().required(),
cpf: Yup.string().required(),
nascimento: Yup.string().required(),
tel: Yup.string().required(),
instagram: Yup.string().required(),
}),
onSubmit: function (values) {
alert(`You are registered! Name: ${values.nome}. Email: ${values.email}. Profession: ${values.cpf}.
Age: ${values.nascimento}`);

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB