0

I am trying to change the error message of the required field, as of now it is showing common error message for all the fields.

But I would like to have different message for each field.

I have tried with localizations, but unable to set the configuration for each field. The one below set the same message for all the fields.

<LocalizedString ElementType="UxElement" StringId="required_field">Value is required.</LocalizedString>

Can you please suggest a way to handle this scenario in the AD B2C custom policy?

Or is there anything I can do with jQuery in the Custom HTML templates to change the error message?

enter image description here

Saravana Kumar
  • 3,669
  • 5
  • 15
  • 35

1 Answers1

1

https://learn.microsoft.com/en-us/azure/active-directory-b2c/localization-string-ids#sign-up-and-self-asserted-pages-example

 <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfMissingRequiredElement">Missing required element: {0}</LocalizedString>

{0} will dynamically use the claim display name.

"error_requiredFieldMissing” can be used in addition.

Jas Suri - MSFT
  • 10,605
  • 2
  • 10
  • 20