giorg
(Agiorg)
December 10, 2013, 2:11pm
1
hi all,
I inherited a Yii project, never worked a lot with this framework. He used a bootstrap plugin, when creates a form uses something like:
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'action' => array('hose/replacenew2', 'testid'=>$hose->test->number, 'id'=>$newcode),
'enableClientValidation' => true,
'type'=>'horizontal'))
how does it work that client validation? It works in most of the site, but in a special case it does not and I don’t understand what to check.
thanks a lot
yiibjorn
(Bjorn)
December 10, 2013, 3:13pm
2
Clientvalidation creates jquery validation functions based on the rules() from the model.
giorg
(Agiorg)
December 10, 2013, 3:16pm
3
thanks a lot for your answer, I think I start to figure out how that works. When does the rules() function been called? If I make a new instance of my model? Also on save I guess?
thanks again
yiibjorn
(Bjorn)
December 10, 2013, 3:20pm
4
This is a really nice wiki that learned me a lot about the rules: http://www.yiiframework.com/wiki/56/