Thursday, November 4, 2010

Validation and Form Helper

Just getting used to setting validation rules in CakePHP.

I notice that the form helper will automatically mark a field if it is
set as required.

Is there a way to make the form helper change the size of a input box,
and restrict the number of characters that can be entered, based on
validation rules?

I have this sort of thing in the model

'maxlength' => array(
'rule'=> array('maxlength',30),
'message' => 'Name can only be 30 characters long'
)

But this does not seem to affect the form controls.

Am I asking to much of the form helper?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

No comments: