Our validation script is just 6.7kb minification, making it 20x smaller than the one Mail Chimp provides.
When you embed a Mail Chimp signup form on your site, it comes with a Java Script validation script named `mc-validate.js`.
This file is 140kb (minified), and includes the entire j Query library, two third-party plugins, and some custom Mail Chimp code. See the Pen Form Validation: The Mail Chimp Standard Signup Form by Chris Ferdinandi (@cferdinandi) on Code Pen.
The `mc-validate.js` script provided by Mail Chimp doesn't just validate the form.
It also submits it with Ajax and displays a status message.
Server-side validation is enough to have a successful and secure form validation.
For better user experience, however, you might consider using client-side validation.Over the last few articles in this series, we've learned how to use a handful of input types and validation attributes to natively validate forms.We've learned how to use the Constraint Validation API to enhance the native browser validation process for a better overall user experience.Otherwise, we'll throw a Java Script error when we go to use them.See the Pen Form Validation: Mail Chimp with Ajax Submit by Chris Ferdinandi (@cferdinandi) on Code Pen.In our See the Pen Form Validation: Mail Chimp with Ajax Submit - Result by Chris Ferdinandi (@cferdinandi) on Code Pen.