I have a custom Azure B2C policy with the following claim that is used in a signup:
...
<ClaimType Id="givenName">
<DisplayName>First Name</DisplayName>
<DataType>string</DataType>
<DefaultPartnerClaimTypes>
<Protocol Name="OAuth2"
PartnerClaimType="given_name" />
<Protocol Name="OpenIdConnect"
PartnerClaimType="given_name" />
<Protocol Name="SAML2"
PartnerClaimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" />
</DefaultPartnerClaimTypes>
<UserHelpText>Your given name (also known as first name).</UserHelpText>
<UserInputType>TextBox</UserInputType>
</ClaimType>
...
I want to be able to localizied the error message that appears when the user does not enter a value and attempts to continue.
This is currently defaulting/using the "required_field" of the localisation element. However there is a number of other claims like this, i.e. surname, where I want a different message to appear for each claim. i.e. "First Name is Required", "Surname is Required" etc; instead of just a generic message for all claims that says "This information is required".
This documentation, https://learn.microsoft.com/en-us/azure/active-directory-b2c/localization-string-ids, shows the various id that are available, but I dont see anyway to accomplish this?
This is how the localization currently looks
...
<LocalizedResources Id="api.localaccountsignup.en">
<LocalizedStrings>
<!-- Header -->
<LocalizedString ElementType="UxElement" StringId="initial_intro">Create a account to start</LocalizedString>
<!-- First name -->
<LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="DisplayName">First name</LocalizedString>
<LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="UserHelpText"></LocalizedString>
<LocalizedString ElementType="ClaimType" ElementId="givenName" StringId="PatternHelpText">First name is required.</LocalizedString>
<!-- Last name -->
<LocalizedString ElementType="ClaimType" ElementId="surname" StringId="DisplayName">Last name</LocalizedString>
<LocalizedString ElementType="ClaimType" ElementId="surname" StringId="UserHelpText"></LocalizedString>
<LocalizedString ElementType="ClaimType" ElementId="surname" StringId="PatternHelpText"></LocalizedString>
...
<LocalizedString ElementType="UxElement" StringId="required_field">This information is required.</LocalizedString>
...
I can see ways to localize the help text and pattern (for the restriction) but nothing for when the user simply doesn't enter anything.
Thanks for your help!