Forms and Form Validation

Forms - Contact and more Complex

Doing things with forms

Using HTML5 and native browser capabilities

Form validation DIY (Do It Yourself) with JS

Form validation with PristineJS Library

PristineJS is a vanilla javascript form validation micro-library.

It has sensible default behavior, and we can easily style Pristine messages by specifying CSS rules for the classes has-success, has-danger, and text-help

A key point to using Pristine is to include the form-group class on the element that any Pristine messages will be appended. For everything but radio and checkbox inputs, the label element works well for this. For radio and checkbox, the fieldset that contains the radio or checkbox group is a good choice.

Form validation with Validate.js Library

Validate.js provides a declarative way of validating javascript objects. The bulk of the work needs to be on the implementor side of things (that's us) for HTML forms, but validate.js does provide a good library of core validation functions.