Form validation module
By using Webpack, we now have the ability to create separate modules and import them in JavaScript. However, we need some kind of approach to organizing our created modules. As the size of the application grows, you might have tens or even hundreds of modules. Organizing them in such a way that they can be easily identified will greatly help your team, as they will be able to easily find a module when needed instead of recreating a module with the same functionality.
In our application, let's create a new folder inside the src/js/ directory called services. This directory will contain all the reusable modules. Now, inside the services directory, create another directory called formValidation, inside which we will create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access