define(['jquery', 'jquery/validate'], function($) {
    $.validator.addMethod(
        'validate-less-than-equals-to-constant',
        function (value, element, param) {
            var num = parseFloat(value);
            return isNaN(num) || num <= param;
        },
        function(param, element) {
            return $.mage.__('Value must not exceed ' + param);
        }
    );
});
