Skip to content

Commit

Permalink
Merge pull request #1047 from 5sControl/fix/1028-email-validation
Browse files Browse the repository at this point in the history
Fix/1028 email validation
  • Loading branch information
Dimskay1988 authored Jan 29, 2025
2 parents 2b0774f + 55a7ce5 commit d25c67e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mobile/src/locales/ru/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"saveData": "Пожалуйста, сохраните свои данные!",
"employeeNotFound": "Работник не найден",
"validLength": "Достигнута максимальная длина текста",
"employeeExists": "Работник с таким именим или email уже существует"
"employeeExists": "Работник с таким именем или email уже существует"
},
"directory": {
"newDirectory": "Новый справочник",
Expand Down
1 change: 0 additions & 1 deletion mobile/src/pages/users/add-user/AddUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ const AddUser = () => {
title={`${t("operations.saveChanges")}?`}
confirmText={t("operations.save")}
cancelText={t("operations.cancel")}
preventDismiss={true}
/>
</IonPage>
);
Expand Down
1 change: 0 additions & 1 deletion mobile/src/pages/users/edit-user/EditUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ const EditUser = () => {
title={`${t("operations.saveChanges")}?`}
confirmText={t("operations.save")}
cancelText={t("operations.cancel")}
preventDismiss={true}
/>
</IonPage>
);
Expand Down
1 change: 1 addition & 0 deletions mobile/src/styles/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ ion-button.bottom-50 {
padding: 0 16px;
position: fixed;
bottom: 50px;
z-index: 3;
}

.card__wrapper {
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/utils/isValidEmail.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function isValidEmail(email: string) {
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const emailPattern = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
return emailPattern.test(email);
}

Expand Down

0 comments on commit d25c67e

Please sign in to comment.