Skip to content

Commit

Permalink
fix(account): fix regex validation and display appropriate error message
Browse files Browse the repository at this point in the history
ref: MANAGER-16210

Signed-off-by: Omar ALKABOUSS MOUSSANA <[email protected]>
  • Loading branch information
Omar ALKABOUSS MOUSSANA committed Feb 14, 2025
1 parent a2bc153 commit 2304463
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,21 @@
</div>

<form name="confirmForm">
<input
type="text"
class="oui-input oui-input_xl mb-4"
name="confirm_code"
id="confirm_code"
data-ng-model="$ctrl.model.confirm_code"
required
ng-pattern="/^[^{}]*$/"
/>
<oui-field
data-size="xl"
data-error-messages="{ 'pattern': ('gdpr_erasure_confirm_form_message_invalid_format' | translate) }"
class="mb-4"
>
<input
type="text"
class="oui-input"
name="confirm_code"
id="confirm_code"
data-ng-model="$ctrl.model.confirm_code"
required
ng-pattern="/^[^<>]*$/"
/>
</oui-field>

<div class="mt-3">
<oui-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"gdpr_erasure_confirm_resend_code": "Récupérer votre code",
"gdpr_erasure_confirm_input_code_prompt": "Renseignez le code que vous avez reçu par e-mail.",
"gdpr_erasure_confirm_form_submit": "Confirmer",
"gdpr_erasure_confirm_form_cancel": "Annuler"
"gdpr_erasure_confirm_form_cancel": "Annuler",
"gdpr_erasure_confirm_form_message_invalid_format": "Veuillez saisir un format valide. Vérifiez que le champ ne contient pas un chevron ouvrant (<) ou un chevron fermant (>)."
}

0 comments on commit 2304463

Please sign in to comment.