Last active
August 7, 2016 13:44
-
-
Save timneutkens/3a18f539f2646c083da9d7bfab6a5555 to your computer and use it in GitHub Desktop.
Magento2 get javascript validation classes like validate-number etc. can be ran on front-end and admin panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var exec = false; | |
if(typeof requirejs !== 'undefined') { | |
exec = requirejs; | |
} else if (typeof require !== 'undefined') { | |
exec = require; | |
} else { | |
console.log('require.js not found'); | |
return false; | |
} | |
exec(['jquery', 'mage/validation'], function($) { | |
console.log(Object.keys($.validator.methods).join("\n")) | |
}); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment