On Dec 20, 7:58 pm, Rob Wilkerson <[email protected]> wrote:
> If I were to simplify this example and simple ask that the login field
> be required, how would I do that?

As it always seems to happen, I found my explicit answer in the book
shortly after hitting "Send", but that did lead to another question.
Given:

public $validate  = array (
        'street_address_1' => array (
                'rule' => 'notEmpty',
                'required' => true,
                'allowEmpty' => false,
                'message' => 'Street address is required'
        ),
        'city' => array (
                'rule' => 'notEmpty',
                'required' => true,
                'allowEmpty' => false,
                'message' => 'City is required'
        )
);

Do I really need the 'rule' key _and_ the 'allowEmpty' key? Would it
suffice to remove the 'rule' key and just retain 'required' and
'allowEmpty'?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to