Hi Everyone, I Am Struggling With Yii Validation Rule, Please Help Me

I have two checkboxes called free and paid and one textbox, one button.

If the user select free checkbox then no validation for the textbox, Other wise we need to validate the textbox.

I am using yii validation form rule.How to achive this validation

You should make a custom validator method such as the authenticate() method shown here.