Here is a great example of a form submission with a Dropzone.js and validation.
The demo itself is placed here for a long time. So I think it's not necessary to clone it to the jsFiddle
Can't find an error in the validator or other related function.
All the fields, except for Dropzone, have the validate class, so if all the fields containing this class are not filled, the form is not sent.
This is related to all fields except "Full Name". If it's not filled (but others are) - the error class will be added and in spite of this, the form will try to send data!
After it, an internal error will occur, because not all data was processed.
For some reason, this field is ignored...
The validation process take place in this function from scripts.js:
plannerValidate: function(e) {
if ("" == e.val()) return e.addClass("error"), false;
if (!e.is('[type="email"]')) return e.removeClass("error"), true;
var t = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.val());
return t ? void 0 : (e.addClass("error"), false)
}
It marks fields that contain errors but doesn't stop the form from data submission if the "Full Name" is empty