
(function ($, kendo) {
    $.extend(true, kendo.ui.validator, {
        rules: {
            hijridate: function (input) {
                if (input.is("[data-val-hijridate]") && input.val() !== "") {
                    
                    var date = input.val();
                    var pattern = new RegExp(input.attr("data-val-hijridate-pattern"));
                    
                    return pattern.test(date);
                }

                return true;
            }
        },
        messages: {
            hijridate: function (input) {
                return input.attr("data-val-hijridate");
            }
        }
    });
})(jQuery, kendo);