Yii custom conditional validation

0
797
views

In this section, will explain custom conditional validation in Yii 1.

In view, the dropdown will run an ajax ‘tutorial/tutorial4’, then return data json ‘data.password_label’ to ‘$(“#password”)’.

In controller, we will get parameter id, and create activeLabel as json.

In model, we use passwordValidation() method in password rules. In passwordHasRequired() method,

Demo :
http://yii1tutorial.bodyfitstation.com/tutorial/tutorial3

LEAVE A REPLY

Please enter your name here
Please enter your comment!