[Answered ]-How run custom code before validate

2👍

I found my answer on this answer https://stackoverflow.com/a/6472021/548558

How I can run custom code.

$("#myform").validate({
    select: {
      required: {
        depends:function(){
           $("#myform").find("#id_select_to").find("option").prop("selected", true);
           return true;
        }
     },
   },
})

Works very well.

👤Azd325

Leave a comment