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.

General Questions /

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

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

Custom error message for ConfirmedPasswordField


Reply


402 Views

Avatar
Optic Blaze

Community Member, 165 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