feat: Adiciona feedback validacoes

This commit is contained in:
Cainã Milech 2023-01-03 23:50:31 -03:00
parent a17271fa7c
commit 5a733f2a23

View File

@ -64,6 +64,8 @@ const phoneNumberMask = [
/\d/,
];
const insta = ["@"];
const Contato = () => {
/*const handleFormikSubmit = (values: IFormikValues, actions) => {};*/
@ -75,6 +77,7 @@ const Contato = () => {
onSubmit={(values: IFormikValues, actions) => {
console.log(values);
actions.resetForm();
alert("formulario enviado");
}}
initialValues={initialValues}
validationSchema={FormSchema}
@ -183,6 +186,21 @@ const Contato = () => {
id="instagram"
name="instagram"
className={errors.instagram && touched.instagram && "invalid"}
/*name="instagram"
render={({ field }: any) => (
<MaskedInput
{...field}
guide={false}
id="instagram"
mask={insta}
type="text"
placeholder="@seuuser"
onBlur={handleBlur}
className={
errors.instagram && touched.instagram && "invalid"
}
/>
)}*/
/>
<ErrorMessage
component="span"
@ -194,7 +212,7 @@ const Contato = () => {
<span>*</span>
<label>
Declaro que li e aceito
<label htmlFor="terms" className={contato["teste"]}></label>
<label htmlFor="terms"></label>
</label>
<Field type="checkbox" id="terms" name="terms" />
</div>