Refactored validation code.

The validation code in details facet, dialog, and sections have
been modified to work more consistently.
This commit is contained in:
Endi S. Dewata
2011-10-25 18:41:45 -05:00
parent 725e2e4624
commit 7142cee430
6 changed files with 37 additions and 50 deletions

View File

@@ -118,7 +118,7 @@ IPA.widget = function(spec) {
}
};
that.check_required = function() {
that.validate_required = function() {
var values = that.save();
if (!values || !values.length || values[0] === '') {
if (that.is_required()) {