Hi guys... it seems like every time I come on here, I'm posting about
validation. Probably because, at least to me, it's one of the most
confusing parts of the framework.

I'm trying to use the new methods of validation from the 1.2 code
(current SVN version as of today), and I'm hitting brick walls
probably because I'm trying to do something that makes no sense.

The initial part of my application is basic user authentication. I
have no issues with login and logout, I understand how to work with
the Session component, and I've been playing with the Cookie component
also to handle persistent logins.

The confusing part is signups, and the problem comes down to the
specific rules I want to apply.

I need my usernames to be alphanumeric only (at least for the moment),
but I also want them to be within a certain size range, and also to be
unique (for obvious reasons). Previously I've used beforeValidate for
this (although my attempt earlier on didn't get very far and gave me
nearly 100 lines of code for the various conditions).

There are similar conditions applied to the other 3 fields in my
signup form - which are password, password_confirmation, and email. I
can accept happily the difficulties of producing a validation system
that does everything that everyone needs it to do - but some things
would make life a lot easier.

1) Multiple validation rules for a single field
2) An equivalent to validates_uniqueness_of from Rails - effectively
connecting to the database and seeing if the submitted value already
exists in the table
3) A replacement for the old VALID_NOT_EMPTY - we now have a
validation rule for seeing if a field is blank, but I can't figure out
how you'd use that to make sure it's NOT blank.
4) Clarification on the comparison rule - should we be using this for
strings (such as in my password/password_confirmation) or will it only
work with numbers?

The last feature I'd like to see is definable error messages for these
validation rules, but I'm pretty sure that's something you guys are
already working on.

To clarify, I don't expect you guys to just jump and develop this
functionality simply because I've asked for it - in fact some of these
things I'm going to have a crack at developing myself before
submitting as a patch - but I would like an idea of if/when these
things are going to appear, if ever?

Thanks :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to