i have an input box like
<input id="BreakdownProgName" type="text" required="required" placeholder="customer name" size="50" name="data[Breakdown][prog_name]">
My model validation is not working for this code but when i put in replace of above code like below-
<?php echo $this->Form->input('Breakdown.prog_name',array('label'=>false,'div'=>false,'size'=>50,'placeholder'=>"customer name",'type'=>'text')); ?>
That time validation is working perfectly.but i want to use first one and also want validation works perfectly with that first code.What should i do?
My controller code is
public function qty_breakdown1()
{
$this->layout='common';
if(empty($this->data) == false)
{
if($this->Breakdown->save($this->data))
{
//echo "This";
$this->Session->setFlash('B Added Successfully.', 'default', array('class' => 'oMsg1 oMsgError1'));
$this->redirect('qty_breakdown');
}
}
else
{
$this->set('errors', $this->Breakdown->invalidFields());
}
}