![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/aheadworks/module-csblock/view/adminhtml/web/js/csblock/validation/ |
define([ 'jquery' ], function ($) { "use strict"; return function () { $.validator.addMethod( 'aw_csblock-validate-date', function(value, element) { let result = $.mage.isEmpty(value) || value.match(/[a-zA-Z]{3}\s\d{1,2},\s[0-9]{4}/); if (!result) { $("body").trigger("processStop"); } return result; }, $.mage.__('Please specify a valid date') ); $.validator.addMethod( 'aw_csblock-required-entry', function(value, element) { let result = !$.mage.isEmpty(value); if (!result) { $("body").trigger("processStop"); } return result; }, $.mage.__('This is a required field.') ); } });