forked from M3-Academy/desafio-react-e-typescript
development #7
@ -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}`);
|
||||
|
0
src/components/Whatsapp/Whatsapp.tsx
Normal file
0
src/components/Whatsapp/Whatsapp.tsx
Normal file
BIN
src/components/Whatsapp/assets/image/whatsapp.png
Normal file
BIN
src/components/Whatsapp/assets/image/whatsapp.png
Normal file
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue
Block a user