From 657c10299997ac8b4a2e50a49dca5a3bac59cf17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Wed, 18 Oct 2023 19:27:17 -0600 Subject: [PATCH 1/2] check if principal's email is public --- src/pages/TeachersUnite/IntroSchoolPrincipalPage.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js index 207ff0664053..91f24721f6d2 100644 --- a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js +++ b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js @@ -19,6 +19,7 @@ import Navigation from '../../libs/Navigation/Navigation'; import TeachersUnite from '../../libs/actions/TeachersUnite'; import useLocalize from '../../hooks/useLocalize'; import * as ValidationUtils from '../../libs/ValidationUtils'; +import * as LoginUtils from '../../libs/LoginUtils'; const propTypes = { /** Login list for the user that is signed in */ @@ -74,6 +75,9 @@ function IntroSchoolPrincipalPage(props) { if (!_.isEmpty(values.partnerUserID) && !Str.isValidEmail(values.partnerUserID)) { ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.enterValidEmail')); } + if (!_.isEmpty(values.partnerUserID) && LoginUtils.isEmailPublicDomain(values.partnerUserID)) { + ErrorUtils.addErrorMessage(errors, 'partnerUserID', translate('teachersUnitePage.error.tryDifferentEmail')); + } return errors; }, From c10bfff26c0f34889d329ba6628c5d42f37ede49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Mon, 30 Oct 2023 14:02:44 -0600 Subject: [PATCH 2/2] fix lint --- src/pages/TeachersUnite/IntroSchoolPrincipalPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js index 6a4a08867bad..a9dc8a2f4642 100644 --- a/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js +++ b/src/pages/TeachersUnite/IntroSchoolPrincipalPage.js @@ -12,9 +12,9 @@ import Text from '@components/Text'; import TextInput from '@components/TextInput'; import useLocalize from '@hooks/useLocalize'; import * as ErrorUtils from '@libs/ErrorUtils'; +import * as LoginUtils from '@libs/LoginUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ValidationUtils from '@libs/ValidationUtils'; -import * as LoginUtils from '@libs/LoginUtils'; import styles from '@styles/styles'; import TeachersUnite from '@userActions/TeachersUnite'; import CONST from '@src/CONST';