Skip to content

Commit

Permalink
Merge pull request wso2#4699 from sumedhe/fix-custom-attrib-validation
Browse files Browse the repository at this point in the history
Add regex validation for custom attributes in the self registration
  • Loading branch information
sumedhe authored Nov 20, 2023
2 parents ab99781 + 768e865 commit 7e5df3c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-snails-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/identity-apps-core": patch
---

Add regex validation for custom attributes in the self registration
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 gültige 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 válida.
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 entrée 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=マイアカウントへ移動
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 válida.
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=转至“我的账户
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e5df3c

Please sign in to comment.