diff --git a/.changeset/witty-snails-help.md b/.changeset/witty-snails-help.md new file mode 100644 index 00000000000..55ec62a11d1 --- /dev/null +++ b/.changeset/witty-snails-help.md @@ -0,0 +1,5 @@ +--- +"@wso2is/identity-apps-core": patch +--- + +Add regex validation for custom attributes in the self registration diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties index 9f724db961f..6ebee2d4a3c 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties @@ -148,6 +148,7 @@ Invalid.reset.link=This link has expired. Set.Password=Set Password Continue=Continue Please.enter.valid.email=Please enter a valid email address. +Please.enter.valid.input=Please enter a valid input. Please.enter.your.email=Please enter your email address. Please.enter.your.username=Please enter your username. Go.to.MyAccount=Go to My Account diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_de_DE.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_de_DE.properties index 7d090f3f4b2..e00d5699b50 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_de_DE.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_de_DE.properties @@ -143,6 +143,7 @@ Invalid.reset.link=Dieser Link ist abgelaufen. Set.Password=Passwort erstellen Continue=Weiter Please.enter.valid.email=Bitte geben Sie eine gültige E-Mail-Adresse ein. +Please.enter.valid.input=Bitte geben Sie eine gltige Eingabe ein. Please.enter.your.email=Geben Sie bitte Ihre Email-Adresse ein. Please.enter.your.username=Bitte geben Sie Ihren Benutzernamen ein. Go.to.MyAccount=Zu Mein Konto gehen diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_es_ES.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_es_ES.properties index 1af559b690d..944716458ec 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_es_ES.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_es_ES.properties @@ -143,6 +143,7 @@ Invalid.reset.link=Este enlace ha expirado. Set.Password=Configurar la clave Continue=Continuar Please.enter.valid.email=Por favor, introduce una dirección de correo electrónico válida. +Please.enter.valid.input=Por favor ingrese una entrada vlida. Please.enter.your.email=Por favor, introduzca su dirección de correo electrónico. Please.enter.your.username=Por favor, ingrese su nombre de usuario. Go.to.MyAccount=ir a mi cuenta diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties index 560ef8e10a7..cc0000ed51e 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties @@ -167,6 +167,7 @@ Cannot.process.submitted.confirmation.code=Code de vérification SMS OTP non val Cannot.obtain.username.from.server.response=Cannot obtain username from server response Enter.tenant.domain=Veuillez entrer votre domaine de locataire. Please.enter.valid.email=S'il vous plaît, mettez une adresse email valide. +Please.enter.valid.input=Veuillez saisir une entre valide. Please.enter.your.email=Veuillez saisir votre adresse e-mail. Please.enter.your.username=S'il vous plaît entrez votre nom d'utilisateur. Go.to.MyAccount=Accéder à mon Compte diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_ja_JP.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_ja_JP.properties index 9b2565bcfc1..0f61a013e86 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_ja_JP.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_ja_JP.properties @@ -139,6 +139,7 @@ Invalid.reset.link=このリンクは有効期限が切れています。 Set.Password=パスワード設定 Continue=続行 Please.enter.valid.email=有効なメールアドレスを入力してください。 +Please.enter.valid.input=有効なエントリを入力してください。 Please.enter.your.email=メールアドレスを入力してください。 Please.enter.your.username=ユーザー名を入力してください。 Go.to.MyAccount=マイアカウントへ移動 diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_pt_PT.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_pt_PT.properties index 30778d02e2e..c9681d04466 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_pt_PT.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_pt_PT.properties @@ -143,6 +143,7 @@ Invalid.reset.link=Este link expirou. Set.Password=Configurar senha Continue=Prosseguir Please.enter.valid.email=Por favor insira um endereço de e-mail válido. +Please.enter.valid.input=Por favor, insira uma entrada vlida. Please.enter.your.email=Por favor, indique o seu endereço de e-mail. Please.enter.your.username=Por favor insira seu nome de usuário. Go.to.MyAccount=Vá para Minha Conta diff --git a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_zh_CN.properties b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_zh_CN.properties index c3e4ba2aae1..477a63838c5 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_zh_CN.properties +++ b/identity-apps-core/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_zh_CN.properties @@ -139,6 +139,7 @@ Invalid.reset.link=此链接已过期。 Set.Password=设置密码 Continue=继续 Please.enter.valid.email=请输入有效的电子邮件地址。 +Please.enter.valid.input=请输入有效的条目。 Please.enter.your.email=请输入您的电子邮件地址。 Please.enter.your.username=请输入您的用户名。 Go.to.MyAccount=转至“我的账户 diff --git a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-username-request.jsp b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-username-request.jsp index 8fe3dc470b6..af88b1a0fd5 100644 --- a/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-username-request.jsp +++ b/identity-apps-core/apps/recovery-portal/src/main/webapp/self-registration-username-request.jsp @@ -1807,6 +1807,18 @@ return false; } + if (element.type === 'text' && element.value != null && !element.checkValidity()) { + $("#" + error_msg_txt).text("<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, + "Please.enter.valid.input")%>"); + $("#" + error_msg_element).show(); + $("#" + element_field).addClass("error"); + var error_msg_txt_element = document.getElementById(error_msg_txt); + if (error_msg_txt_element) { + $("html, body").animate({scrollTop: $("#" + error_msg_txt).offset().top}, 'slow'); + } + + return false; + } return true; }