Good list of options; just to note that in the 1.2 beta 'between' has
been replaced with 'separator' and 'selected' has been replaced with
'value' - at least for radio buttons and checkboxes - not tested for
other input types.
On Jan 30, 2:15 am, jonknee [EMAIL PROTECTED] wrote:
I would
Can someone post a simple 1.2 beta example of a form w/ validation? I
have tried all kinds of examples on various sites, but none work. I'd
like to see the view for a simple form, and the corresponding
controller and model. If the validation could show an example of
required and maxLength
Why just don't bake this simple example?
On 29 Sty, 22:33, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can someone post a simple 1.2 beta example of a form w/ validation? I
have tried all kinds of examples on various sites, but none work. I'd
like to see the view for a simple form, and the
Try this:
In the Model:
---
var $validate = array(
'fieldName' = array(
'rule' = array('maxLength', '8'),
'message' = 'Maximum 8 characters long',
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm going to cut out a bit of this to make it simpler, but here is a
section of the code behind my users-signup page, and the
corresponding validation model.
VIEW:
create('User', array('action' = 'signup')); ?
input('User/username',
I would probably add the length limits to the form as well, I find it
frustrating when I fill out a form and get back errors that were for
limitations I didn't know about.
I didn't see it listed anywhere, but I went ahead and documented what
can be in the $form-input() $options array: