usually required is also added if your DB field is default NOT NULL if it is DEFAULT NULL it should have no required class
On 27 Sep., 09:28, WebbedIT <[email protected]> wrote: > You have overwritten the div with the 'div'=>'row' attribute. > > HTH, Paul. > > On Sep 26, 4:54 pm, heohni <[email protected]> > wrote: > > > > > > > > > Hi, > > > I have this in my model, > > var $validate = array( > > 'name' => array( > > 'required' => array('rule' => 'notEmpty', 'message' => > > 'EmptyName', 'required' => true) > > ), > > > but I don't get the class 'required' added: > > only: > > <div class="row"> > > <label for="SmscallbackName">Name</label> > > <input id="SmscallbackName" type="text" name="data[Smscallback] > > [name]"> > > </div> > > > with this call > > <?php echo $form->input('name', array('label'=>__('Ihr Name', true), > > 'div' =>'row')); ?> > > > Can anyone see what I am doing wrong? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
