Hi, all.
I'm working on a form where the user can create a member account - there is a localization issue. I am using client side validation with build in registration model - but I can't control the messages ;( The validation messages
("Please enter a valid e-mail address", "A member with this username already exists", "The password is not strong enough", etc) should appear in a specific language - depending on the current language settings (en, de, pl).
Hi Pawel,
it looks like good idea, so I'll give it a try. It would be nice if RegisterModel had virtual properties, so we could also easily override @DataAnnotations.
Thx a have a nice day M8.
Validation messages while creating members
Hi, all.
I'm working on a form where the user can create a member account - there is a localization issue. I am using client side validation with build in registration model - but I can't control the messages ;( The validation messages ("Please enter a valid e-mail address", "A member with this username already exists", "The password is not strong enough", etc) should appear in a specific language - depending on the current language settings (en, de, pl).
The html output:
Hoping someone might help point me in the right direction.
Thanks, Piotr
Hi Piotr,
unfortunately it seems that ModelState's errors are hardcoded inside default RegisterController.
You can find it here https://github.com/umbraco/Umbraco-CMS/blob/release-7.5.4/src/Umbraco.Web/Controllers/UmbRegisterController.cs#L48
What you can do is to copy UmbRegisterController code and create your own controller with dictionary items instead of hardcoded strings.
Please let me know if you have any more questions, Cheers
Hi Pawel,
it looks like good idea, so I'll give it a try. It would be nice if RegisterModel had virtual properties, so we could also easily override @DataAnnotations.
Thx a have a nice day M8.
is working on a reply...