0👍
✅
You can create a Validation class
as other file. Then at your application boot (lets imagine its app.js) you can call constructor to spreading validation through all components.
Example code to clarify; https://jsfiddle.net/hrz2u2dc/2/
Source:stackexchange.com