我正在为regexpattern不匹配中的错误消息修改密钥罩messages_en.properties文件:
invalidPasswordRegexPatternMessage=Password must contain at least one special character\n
Password must contain at least one upper case character\n
Password must contain at least one numerical character\n
Password should not contain blank space\n
Password should consist of 8-15 characters但它不会在UI中弹出的toast中使用\n显示换行符。

我只尝试了反斜杠,但也不起作用。
发布于 2019-10-11 18:45:17
您可以在消息中直接使用<br>,但必须将?no_esc附加到freemarker .ftl文件中的消息输出中。
示例:
${msg("msgId")?no_esc}${kcSanitize(message.summary)?no_esc}发布于 2018-04-04 18:27:37
我使用了br标记,然后在html中添加了: ng-bind-html="notification.message“,并在services.js文件中找到了notifications.error,因此我根据以下指南添加了'ngSanitize‘作为依赖项:https://www.w3schools.com/angular/ng_ng-bind-html.asp
https://stackoverflow.com/questions/49645805
复制相似问题