Updating to allow addAuthorsToInformation and other custom forms to detect validation errors combined at top of page(method updated was findValidationErrors)

This commit is contained in:
hjkhjk54 2011-11-22 21:40:59 +00:00
parent a01c0fc74c
commit 68e2cd7a58

View file

@ -41,8 +41,12 @@ vitro.customFormUtils = {
}, },
// Return true iff there are validation errors on the form // Return true iff there are validation errors on the form
//Updating to include new functionality where errors are on top of page
findValidationErrors: function() { findValidationErrors: function() {
var validationErrorSection = $('#error-alert');
if(validationErrorSection.length > 0) {
return true;
}
return this.form.find('.validationError').length > 0; return this.form.find('.validationError').length > 0;
// RY For now, we just need to look for the presence of the error elements. // RY For now, we just need to look for the presence of the error elements.