Limiting Error Messages

Hello,

I’m using Authlogic and I don’t like the error messages it provides for acts_as_authentic and I was wondering how to go about cleaning them up.

My point is, if a password/email are missing, then I get …

Email is too short (minimum is 6 characters) Email should look like an email address. Email can’t be blank Password is too short (minimum is 4 characters) Password doesn’t match confirmation Password confirmation is too short (minimum is 4 characters)

when all I really need is … Email can’t be blank Password can’t be blank

… if the fields are blank.

If the fields have a value, then I would like to check the length, if that is valid, then I would like to check format.

I wanted to override validation but all I’ve found in the docs are ways to enable or disable validation of certain fields through the Config.

And now I realise the same is true for rails in general. If you use more than one validates_* method, then you get more than one message. There doesn’t appear to be an order.

I’ve read this but it only whacks things on one line (form what I’ve seen of it) http://railsforum.com/viewtopic.php?id=38068

So how do you go about cleaning this up neatly? I don’t want 6 or more messages going back to the user.

Yes, I can go through the errors and delete ones I don’t want but that’s not ideal and writing my own validations is cool but the stuff is already there so why do it again?!

Suggestions, please?

CIA

-ants