When implementing a form on a web page, something that must always be taken into account is validation, since we will gain a lot if we prevent incorrect and even malicious data from reaching us.
In addition to validation server-side made in PHP You also have to validate in Javascript to filter the first wave, and for this there is nothing better than using a jQuery plugin, since it usually makes things really easy for us.
Happy.js It is an excellent plugin for its efficiency, because it takes up practically nothing and also because it supports the use of regular expressions, something that allows us to go a little further in the validations.
Link | Happy.js
Source | WebResourcesDepot