- ABP Framework version: v9.0.0
- UI Type: MVC
- Database System: SQL Server
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace:
- Steps to reproduce the issue:
I want to make each rule on it's own line so it's clearer to read, Then each can end with a '.' to get ride of the '.,' issue, how can I make the changes?
5 Answer(s)
-
0
Hi,
It seems like a problem, I will check it.
-
0
thanks, any updates?
-
0
HI, you can override the page alerts page
Create a
Default.cshtml
file under theThemes/LeptonX/Components/Common/PageAlerts
folder in the authserver project.@model Volo.Abp.AspNetCore.Mvc.UI.Alerts.AlertList @if (Model.Any()) { <div id="AbpPageAlerts"> @foreach (var alertMessage in Model) { alertMessage.Text = alertMessage.Text.Replace(".,", "."+Environment.NewLine); <abp-alert alert-type="@(alertMessage.Type)" style="white-space: pre-line" dismissible="@alertMessage.Dismissible">@if (alertMessage.Title != null) { <h4>@alertMessage.Title</h4> }@alertMessage.Text</abp-alert> } </div> }
-
0
is there a way to customize the error messages? for example we show 4 error messages here for pwd, but is there a way to combine them into one? like here it shows one message for each rule, I want to combine them and shows passwords must be at least 6 characters and must have at least...
-
0
Hi,
Yes, but the localized text is independent: https://github.com/abpframework/abp/blob/docspatch/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/en.json#L54-L59
You can override the Register model.
[Dependency(ReplaceServices = true)] [ExposeServices(typeof(RegisterModel))] public class MyRegisterModel : RegisterModel { protected override string GetLocalizeExceptionMessage(Exception exception) { var message = base.GetLocalizeExceptionMessage(exception); if(message.Contains("Passwords must")) { message = // change message here } return message; } }