validator.js
validator.js copied to clipboard
How to use/install without webpack / other builders?
I've just been installing packages with npm and then pointing my path to the .min.js files and usually it's worked out but lately I've been running into a lot that seem to require webpack or a webpack equivalent?
It's even more confusing because for some libraries like this one it sounds like you support both methods by allowing us to load a standalone script as shown in this example
<script type="text/javascript" src="validator.min.js"></script>
<script type="text/javascript">
validator.isEmail('[email protected]'); //=> true
</script>
But when i point to the validator.min.js it seems to be almost empty. When i use the cdn it works perfectly fine though and I can see the file actually has stuff filled in.
- How can i get to this point ideally via just npm install and pointing to files?
- If that's not possible can someone clearly yet simply explain at a high level what methods are available to me? I don't seem to understand some important things. My best best understanding is that i need to use webpack or something but I don't even know if that's 100% necessary and i'm not using node like most people are. I have to work with adobe cold fusion which is partly why what I need to do and what applies to me in order to get this working is so confusing to me.
Help would be greatly appreciated.