-
+
+
+
+
+
+
-
)}
-
- )
-
-}
+ );
+};
diff --git a/src/pages/Intitucional/Institucional.module.scss b/src/pages/Intitucional/Institucional.module.scss
index 8b2d7a9..deaee00 100644
--- a/src/pages/Intitucional/Institucional.module.scss
+++ b/src/pages/Intitucional/Institucional.module.scss
@@ -2,7 +2,7 @@
display: flex;
gap: 30px;
height: 100%;
- max-height: 465px;
+ // max-height: 465px;
margin: 80px 0 70px;
@media (max-width:1024px) {
@@ -43,12 +43,14 @@
width: 100%;
min-width: 302px;
height: 100%;
+ max-height: 285px;
padding: 0;
margin: 0;
@media (min-width:2500px) {
min-width: 590px;
+ max-height: 465px;
}
@@ -103,7 +105,11 @@
width: 100%;
height: 100%;
-
+ h2 {
+ @media (max-width:1024px) {
+ text-align: center;
+ }
+ }
p {
font-family: 'Roboto';
diff --git a/src/pages/styles.module.scss b/src/pages/styles.module.scss
index eca1ca5..98fb71f 100644
--- a/src/pages/styles.module.scss
+++ b/src/pages/styles.module.scss
@@ -17,7 +17,8 @@
@media (max-width:1024px) {
margin: 0 16px;
- z-index: -9;
+ // z-index: -9;
+
}
h1 {
diff --git a/src/schema/ContactFormSchema.ts b/src/schema/ContactFormSchema.ts
index 8a680c4..739d837 100644
--- a/src/schema/ContactFormSchema.ts
+++ b/src/schema/ContactFormSchema.ts
@@ -1,20 +1,30 @@
import * as Yup from "yup";
-import { cpfRegex, phoneRegex, instaRegex } from "./ContactValidations";
+import {
+ cpfRegex,
+ dateRegex,
+ instaRegex,
+ phoneRegex
+} from "./ContactValidations";
export default Yup.object().shape({
- name: Yup.string().required("*Campo Obrigatório"),
+ name: Yup.string()
+ .min(3, "O campo deve ter no mínimo 3 caracteres")
+ .required("*Campo Obrigatório"),
email: Yup.string()
.email()
.required("*Campo Obrigatório")
.email("E-mail inválido"),
cpf: Yup.string()
- .matches(cpfRegex, "CPF inválido")
- .required("*Campo Obrigatório"),
+ .required("*Campo Obrigatório")
+ .matches(cpfRegex, 'CPF inválido'),
telefone: Yup.string()
- .matches(phoneRegex, "numero inválido")
- .required("*Campo Obrigatório"),
+ .required("*Campo Obrigatório")
+ .matches(phoneRegex, 'Número de telefone inválido'),
instagram: Yup.string().matches(instaRegex, "conta inválida"),
- data: Yup.date().required("*Campo Obrigatório"),
+ data: Yup.date()
+ .required("*Campo Obrigatório")
+ .max(new Date(),'Data de nascimento inválida'),
+
checkbox: Yup.boolean().oneOf([true], "*"),
});
diff --git a/src/schema/ContactValidations.ts b/src/schema/ContactValidations.ts
index 85167cf..9b509e7 100644
--- a/src/schema/ContactValidations.ts
+++ b/src/schema/ContactValidations.ts
@@ -1,3 +1,4 @@
-export const phoneRegex = /\([1-9]{2}\) [1-9]{2}\d{3}-\d{4}/;
-export const cpfRegex = /\d{3}.\d{3}.\d{3}-\d{2}/;
+export const phoneRegex =/^\([1-9]{2}\) [2-9][0-9]{3,4}\-[0-9]{4}$/;
+export const cpfRegex = /^[0-9]{3}\.?[0-9]{3}\.?[0-9]{3}\-?[0-9]{2}$/
export const instaRegex = /(?:^|[^\w])(?:@)([\w-](?:(?:[\w-]|(?:\.(?!\.))){0,28}(?:[\w-]))?)/;
+export const dateRegex = /^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4}$/;
diff --git a/yarn.lock b/yarn.lock
index 1804d2d..f17996e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2100,6 +2100,20 @@
dependencies:
"@types/react" "*"
+"@types/react-input-mask@^3.0.2":
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/@types/react-input-mask/-/react-input-mask-3.0.2.tgz#60df645cdb2415c97a8f97316011eb3ede78dc1e"
+ integrity sha512-WTli3kUyvUqqaOLYG/so2pLqUvRb+n4qnx2He5klfqZDiQmRyD07jVIt/bco/1BrcErkPMtpOm+bHii4Oed6cQ==
+ dependencies:
+ "@types/react" "*"
+
+"@types/react-maskedinput@^4.0.6":
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/@types/react-maskedinput/-/react-maskedinput-4.0.6.tgz#cbb3a689d81b594b9d3bb2d359e86d1e628cb41b"
+ integrity sha512-rLm0t4CcCE0smsOVgZTzwT/amDDBh1sL46V+V22JIeyChibCM7Oe3TNSk66oJK0fHishDyzRg7pd+sH4sozGqg==
+ dependencies:
+ "@types/react" "*"
+
"@types/react@*", "@types/react@^18.0.0":
version "18.0.26"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.26.tgz#8ad59fc01fef8eaf5c74f4ea392621749f0b7917"
@@ -5357,6 +5371,13 @@ internal-slot@^1.0.3:
has "^1.0.3"
side-channel "^1.0.4"
+invariant@^2.2.4:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
+
ip@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
@@ -6469,7 +6490,7 @@ lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
-loose-envify@^1.1.0, loose-envify@^1.4.0:
+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -8121,6 +8142,14 @@ react-headless-accordion@^1.0.2:
resolved "https://registry.yarnpkg.com/react-headless-accordion/-/react-headless-accordion-1.0.2.tgz#df45168fc379a9014bd7becc2f4be100af456b6e"
integrity sha512-wKBTB/+aAr9MGX5RYi3sdmKOSzevKdmbGRw9JTe7XONiHlTo+pC1OiggL9NUxp5QeQcTnX0rryhuySeGsqBfBg==
+react-input-mask@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/react-input-mask/-/react-input-mask-2.0.4.tgz#9ade5cf8196f4a856dbf010820fe75a795f3eb14"
+ integrity sha512-1hwzMr/aO9tXfiroiVCx5EtKohKwLk/NT8QlJXHQ4N+yJJFyUuMT+zfTpLBwX/lK3PkuMlievIffncpMZ3HGRQ==
+ dependencies:
+ invariant "^2.2.4"
+ warning "^4.0.2"
+
react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
@@ -9626,6 +9655,13 @@ walker@^1.0.7:
dependencies:
makeerror "1.0.12"
+warning@^4.0.2:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
+ integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
+ dependencies:
+ loose-envify "^1.0.0"
+
watchpack@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"