How to configure setCustomValidity for selectize in onchange event? : How to configure setCustomValidity for selectize in onchange event?
every think is ok, but setCustomValidity does not work. 

    var countyPhoneCodeId = '#county_phone_code';
    $(countyPhoneCodeId).selectize({
        maxItems: 1,
        labelField: 'name',
        valueField: 'code',
        render: {
            item: function (item, escape) {
                return "<div><span style='margin-top:2px' class='flag flag-" + escape(item.code) + "' />&nbsp;" + escape(item.name) + "</div>";
            },
            option: function (item, escape) {
                return "<div><span style='margin-top:2px' class='flag flag-" + escape(item.code) + "' />&nbsp;" + escape(item.name) + "</div>";
            }
        },
        onChange: function(value) {
            if (value == "") {
                $(countyPhoneCodeId).css('border', 'solid 2px red');
                document.querySelector(countyPhoneCodeId).setCustomValidity("Դաշտը պարտադիր է");
                document.querySelector(countyPhoneCodeId).reportValidity();
            } else {
                $(countyPhoneCodeId).css('border', 'solid 2px green');

                document.querySelector(countyPhoneCodeId).setCustomValidity("");
            }
        }
    });