Base solution for your next web application
Open Closed

Validation Message #1056


User avatar
0
maharatha created

Hi -

I am now building an application where in I have asked the UI developers not to put any validation as of now so that I want to make sure all validations are present for the middle tier and also for the web services.

So when I submit a form the validation message returned by Abp is something like this :

The UserName is required. My problem is UserName is the column name, but when I put DisplayName in the DTO for "UserName" it doesn't recognize it. I would like to show an user friendly message like The User Name is required instead of the datbase column name or DTO property name.

Can you let me know where to make the changes?


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Our design is like that:

    Server side validation is for data consistency and security, not for user experience. That's why we don't care about localization of validation messages. We assume that you have already client side validation which prompts errors as user friendly and localized. So, since this is a client side topic, I suggest you to implement such a logic in client side. That's much better for user experience.

  • User Avatar
    0
    maharatha created

    Thank You Point noted. : :)