I've just looked at some old code and I recall that I had to leave the
message string empty for it to work. I didn't have a problem with the
position of allowEmpty = true.
then in the form, I handles the message like this:
echo $form->label('title', __('TITULO_GA_BLOCS',true));
echo $form->error('title',__('BLANK_TITLE_GA_BLOCS',true), array
('escape'=>false, 'class'=>'form_error'));
echo $form->input('title',array('label'=>false,'div'=>false));
L
On Feb 16, 4:08 pm, WebbedIT <[email protected]> wrote:
> I have a feeling that by assigning allowEmpty = true to my first rule
> it then skipped all validation when the field was empty ... by moving
> my second rule to be the first rule I seem to have overcome my
> problem.
>
> What are your thoughts on this? Should allowEmpty on one rule affect
> all subsequent rules on the same field, would imagine this would trip
> a few people up?!?
>
> Paul.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---