feat: add validacao yup

This commit is contained in:
Mateus Antonio Rodrigues Lopes 2023-01-11 13:55:27 -03:00
parent 875c0aea75
commit 70b44d5c2f
5 changed files with 10 additions and 54 deletions

View File

@ -1,7 +0,0 @@
// import * as Yup from "yup"
// export default Yup.object().shape({
// name: Yup.string().required("*Campo Obrigatório"),
// })

10
src/schema/FormSchema.ts Normal file
View File

@ -0,0 +1,10 @@
import * as Yup from "yup"
export default Yup.object().shape({
name: Yup.string().required("*Campo Obrigatório"),
email: Yup.string().required("*Campo Obrigatório").email("*Email inválido"),
cpf: Yup.string().required("*Campo Obrigatório"),
birthDate: Yup.string().required("*Campo Obrigatório"),
phone: Yup.string().required("*Campo Obrigatório"),
check: Yup.boolean().oneOf([true],''),
})

View File

@ -1,9 +0,0 @@
// Utils
@import "./utils/reset";
@import "./utils/variaveis";
// Pages
@import "../pages/app.scss";
// Components
@import "../components/header/header.scss";

View File

@ -1,13 +0,0 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
a {
text-decoration: none;
}
li {
list-style-type: none;
}

View File

@ -1,25 +0,0 @@
// Font
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
$font-family-Roboto: "Roboto", sans-serif;
// Colors
$color-black: #000;
$color-black-200: #100d0e;
$color-gray-200: #303030;
$color-gray-300: #5e5e5e;
$color-gray-350: #7d7d7d;
$color-gray-400: #919191;
$color-gray-450: #b9b7b7;
$color-gray-500: #c6c6c6;
$color-gray-600: #c4c4c4;
$color-gray-650: #e5e5e5;
$color-gray-700: #f2f2f2;
$color-gray-800: #f9f9f9;
$color-white: #fff;
$color-red: #ff0000;
$color-blue: #5200ff;