client side validation in custom validation rule

Hello everyone,

In my model I have a custom validation rule, however this does not work client side Can I get help please?

public function rules()


    return [

        [['support'], 'custom_validation_rule']



public function custom_validation_rule($attribute, $params){

    if($attribute == '1'){




You have to create a standalone validator.

And then you can write clientValidateAttribute() to implement client-side validation.

Ok thank you very much. I will test it and I will tell you. Thank you very much again.