问题描述
我正在尝试更改必填字段的错误消息,截至目前,它显示所有字段的常见错误消息。
但我希望每个字段都有不同的消息。
我尝试过本地化,但无法为每个字段设置配置。下面的一个为所有字段设置了相同的消息。
<LocalizedString ElementType="UxElement" StringId="required_field">Value is required.</LocalizedString>
您能否建议一种在 AD B2C 自定义策略中处理这种情况的方法?
或者我可以在自定义 HTML 模板中使用 jQuery 做什么来更改错误消息?
解决方法
<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfMissingRequiredElement">Missing required element: {0}</LocalizedString>
{0} 将动态使用声明显示名称。
"error_requiredFieldMissing”
可以另外使用。