Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Custom error message for ConfirmedPasswordField


Go to End


698 Views

Avatar
Optic Blaze

Community Member, 190 Posts

21 September 2012 at 10:05am

Hi there,

I am using ConfirmedPasswordField to make sure that users enter their passwords correctly. If have also implemented

Aram Balakjian's tutorial on how to add extra validation to the field ( http://www.ssbits.com/snippets/2010/using-a-password-validator/ )

The problem that i get now is that when the user types in a password that is too short, he gets the following error (see atached as well) instead of a jquery/javascript error or even a nice .ss template page that explains what is going on:

"[User Error] Uncaught ValidationException: Validation error writing a Member object: Password is too short, it must be 7 or more characters long.; You need to increase the strength of your passwords by adding some of the following characters: uppercase, digits, punctuation. Object not written."

How can i get the system to display a more user friendly error

Thanks

Attached Files