Skip to content

Commit

Permalink
Merge pull request #32 from fga-eps-mds/31-retirar-validacao-email
Browse files Browse the repository at this point in the history
31 Retirando validacao de email institucional
isadoragalvaoss authored Jun 9, 2023
2 parents f04b9a6 + 2e47f4c commit a800791
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/components/form/Register.tsx
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@ const RegisterForm: React.FC = () => {
const [visibleRadioCompanies, setVisibleRadioCompanies] = useState(false);
const [uf, setUf] = useState<UfProps[]>();
const companies = [{ label: "Instituto Essência do Saber", value: 0 }];
const [isDNITUser, setIsDNITUser] = useState(false);


const onFinish = async (values: any) => {
@@ -84,14 +83,10 @@ const RegisterForm: React.FC = () => {
{
required: true,
message: "Por favor, preencha o campo email!",
...(isDNITUser && {
pattern: new RegExp("^[a-zA-Z0-9._%+-]+@dnit\\.gov\\.br$"),
message: "O e-mail deve ser institucional",
}),
...(!isDNITUser && {
type: "email",
message: "O e-mail não é válido",
}),
},
{
type: "email",
message: "O email não é válido"
}
]}
>
@@ -139,8 +134,6 @@ const RegisterForm: React.FC = () => {
onClick={() => {
setVisibleRadioUF(true);
setVisibleRadioCompanies(false);
setIsDNITUser(true);
form.validateFields(["email"]);
}}
>
<p className="radio1">Usuário DNIT</p>
@@ -151,8 +144,6 @@ const RegisterForm: React.FC = () => {
onClick={() => {
setVisibleRadioCompanies(true);
setVisibleRadioUF(false);
setIsDNITUser(false);
form.validateFields(["email"]);
}}
>
<p className="radio2">Empresa Executora</p>

2 comments on commit a800791

@vercel
Copy link

@vercel vercel bot commented on a800791 Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a800791 Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

2023-1-dnit-front – ./

2023-1-dnit-front.vercel.app
2023-1-dnit-front-git-main-dnit.vercel.app
2023-1-dnit-front-dnit.vercel.app

Please sign in to comment.