Answer the question
In order to leave comments, you need to log in
[[+content_image]]
whenClient checkbox not working in yii2?
There is a checkbox on the form , but this line does not work [['login','district'],'unique', 'whenClient'=>"function (attribute,value) { return !($(#TV).prop( 'checked'))}"]. Though similar line with dropdownList works fine
Answer the question
In order to leave comments, you need to log in
I think I missed quotes:
function (attribute,value) {
return $('#TV').not(':checked');
}
I still don't understand why it doesn't work. Wrote ajax validation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question