Tuesday, December 6, 2011

Re: Validation rules - what a nightmare...

Most developers understand that a user might enter a password incorrectly, so the wrong value is saved and he can't log back in; so they ask them to confirm the password (which is pretty much common practice). The validation is done on the pre-hashed versions so all validation rules run, and is hashed before saving.

Jeremy Burns

On 6 Dec 2011, at 09:1347, heohni wrote:

Hi!

I do not work with confirm password fields.
Just on a simple save routine, when I want to register a user, I need
to check the password fields that's
a) not empty and
b) within a between range

I can't belive that other programmers work different?
How do they validate a user register form?

Or am I just blind?



On 4 Dez., 17:25, bujanga <buja...@gmail.com> wrote:
Your password input is auto-hashed and therefore will never match your
rule ('between', 6,15). And yes, I realize that is almost the example
given in the book. (http://book.cakephp.org/view/1154/between)

On passwords:http://book.cakephp.org/view/1263/password

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: