Azure B2C: add a unique Required field message for each input on the Sign-Up page

Term1te 41 Reputation points
2022-11-09T12:16:24.16+00:00

Good day community! Is there any possibility on the Sign-Up page to add a unique error message for each empty field?

258618-image.png

As far as I understand, in the script that B2C sends along with the page, the message is always taken from the CONTENT.required_field variable, and it is always the same for all fields.

258696-image.png

I found a similar topic where it is suggested to use a custom script to change messages.
https://stackoverflow.com/questions/62673167/localization-of-requiredfield-on-a-claim-type-in-a-custom-azure-b2c-policy?noredirect=1&lq=1
But is there an alternative solution?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments
{count} votes

Answer accepted by question author
  1. Givary-MSFT 35,686 Reputation points Microsoft Employee Moderator
    2022-11-15T09:14:50.96+00:00

    @Term1te Apologies for the delay in responding to your query. Researched on your ask you need to remove the Content.Require_field in this case which has default error message and need to set custom message by adding regex to have at least one character otherwise display custom error message 

    Reference: https://stackoverflow.com/questions/72004490/how-to-display-an-error-message-when-input-does-not-match-regex

    Let me know if you have any further questions.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.