html5 complete formvalidation code example
Example: input show validation message
// Validate emai
var applicationForm = document.getElementById("applicationForm");
if (applicationForm.checkValidity()) {
applicationForm.submit();
} else {
applicationForm.reportValidity();
}