From dac47ac9f49ba6acc239cd4f9261b3e182b2d9c6 Mon Sep 17 00:00:00 2001 From: Rafael Sampaio Date: Fri, 13 Jan 2023 15:57:30 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20adiciona=20valida=C3=A7=C3=A3o=20quanti?= =?UTF-8?q?dade=20m=C3=ADnima=20caracteres=20input=20nome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/schema/FormSchema.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/schema/FormSchema.ts b/src/schema/FormSchema.ts index 88b105d..b270d23 100644 --- a/src/schema/FormSchema.ts +++ b/src/schema/FormSchema.ts @@ -1,7 +1,9 @@ import * as Yup from "yup"; export default Yup.object().shape({ - name: Yup.string().required("*Campo Obrigatório"), + name: Yup.string() + .min(3, "Mínimo de 03 caracteres") + .required("*Campo Obrigatório"), email: Yup.string().required("*Campo Obrigatório").email("e-Mail inválido"), cpf: Yup.string() .matches(/^\d{3}.\d{3}.\d{3}-\d{2}$/, "CPF inválido") -- 2.34.1