Can anybody suggest a way for me to customise the error messages displayed on a Registration page? For example if my passwords don't match or a username is already registered.
Is this using an Account Manager page? Does it not have a Messages screen to customise these errors?
Hi Avi, how are things going?
Yup, it is an Account Manager Page. The messages page does not include the error message e.g. if there is already a user with a particular name. What I am getting is:
[indent]Unable to set "username" it is a unique attribute and another asset already uses "test_user" [SYS0251][/indent]
If you set a "Required Attribute" for username, are you able to customise its error message? I can't remember if you can or not, and my dev system is offline atm.
Yeah, that sounds about right Avi.
Unfortunately that only sets the error message if the field is not filled in at all.
I didn't think you could customise this message because it is deep inside the user asset and not a surface error like form validation.
[SYS0251] is defined in ./core/locale/en/lang_errors.xml so it seems the only way around this at the moment would be to change localisation file and rerun the script.
Yes, but then it would be reverted at the next upgrade because it is a core file. There really isn't a nice way of changing that error message without creating your own set of translation files. That is a bit excessive though. It may be easy to just rewrite the error with JS if that is an option for your users.