On Aug 13, 2010, at 2:19 AM, mdipierro wrote: > @elfuogo1, let us know if the problems are solved.
Following up on Mr Freeze's comment, IS_STRONG is a bit problematical, or at least it doesn't fit so well into the pattern of the other validators. There's no good way to translate its messages, for example, without reducing them to a single message (which isn't at all what it does by default). I don't have a solution, but it might be worthwhile documenting its quirks. > > On Aug 12, 10:36 pm, "mr.freeze" <nat...@freezable.com> wrote: >> IS_STRONG is failing for a different reason but displaying your error >> message. The defaults are: >> min=8, max=20, upper=1, lower=1, number=1, special=1 >> >> If you remove your error message, you will get a descriptive message >> for each failure. You can set each parameter to 0 to disallow and to >> None to not check. >> db.auth_user.password.requires = [IS_STRONG(min=8,max=None,upper=None, >> >> lower=None,special=None,number=None,error_message='Too short'), >> CRYPT(auth.settings.hmac_key)] >> >> Perhaps the defaults should be less aggressive. Not sure on the >> CRYPT, it hashes the password for me. >> >> On Aug 12, 9:53 pm, elfuego1 <elfue...@gmail.com> wrote: >> >>> Hi, >> >>> I have a problem with two things in registration form. >> >>> 1. Definition for password field in database looks as follows: >> >>> db.auth_user.password.requires = [IS_STRONG(min=8 ,error_message='Your >>> password is too short!'), CRYPT(auth.settings.hmac_key)] >> >>> But the form is not accepting passwords. Each time I want to send a >>> form it shows me error message: 'Your password is too short', even if >>> the password is much longer than required 8 signs. >>> After removing 'min=8' parameter I'm able to save my form in database. >> >>> 2. Although I have provided an encryption setting: >> >>> auth.settings.hmac_key='sha512:something >> >>> password is not encrypted in the database. >> >>> Can you help me and tell me what I'm doing wrong? Am I missing some >>> parameters?