src/salvation.js
function (event) {
            var self = this;
            if (this.invalidElements.length > 0)
                event.preventDefault();
            // Even if the invalidElements count
            // does not indicate any invalidated
            // elements, the plugin should make
            // sure that there are none that did
            // somehow bypass the control. This
            // is an issue mainly when submitting
            // without editing a form.
            for (var validationType in self.validate) {
                var invalidFields = self.getElementsByPattern(self.validate[validationType], self.patterns[validationType], validationType);
                if (invalidFields.length > 0) {
                    this.invalidElements = invalidFields;
                    event.preventDefault();
                    // The warning method
                    self.publicInterface.onInvalidation(invalidFields, this.legends[validationType]);
                }
            }
        }
function (event) {
            var self = this;
            if (this.invalidElements.length > 0)
                event.preventDefault();
            // Even if the invalidElements count
            // does not indicate any invalidated
            // elements, the plugin should make
            // sure that there are none that did
            // somehow bypass the control. This
            // is an issue mainly when submitting
            // without editing a form.
            for (var validationType in self.validate) {
                var invalidFields = self.getElementsByPattern(self.validate[validationType], self.patterns[validationType], validationType);
                if (invalidFields.length > 0) {
                    this.invalidElements = invalidFields;
                    event.preventDefault();
                    // The warning method
                    self.publicInterface.onInvalidation(invalidFields, this.legends[validationType]);
                }
            }
        }
function ( event ) { var self = this ; if ( this . invalidElements . length > 0 ) event . preventDefault ( ) ; // Even if the invalidElements count // does not indicate any invalidated // elements, the plugin should make // sure that there are none that did // somehow bypass the control. This // is an issue mainly when submitting // without editing a form. for ( var validationType in self . validate ) { var invalidFields = self . getElementsByPattern ( self . validate [ validationType ] , self . patterns [ validationType ] , validationType ) ; if ( invalidFields . length > 0 ) { this . invalidElements = invalidFields ; event . preventDefault ( ) ; // The warning method self . publicInterface . onInvalidation ( invalidFields , this . legends [ validationType ] ) ; } } }
Callback function for event submit.
Validates elements, but will first
check if the global "formInvalid"-
variable is set, before validation.

@param       Event
Callback function for event submit . Validates elements but will first check if the global formInvalid - variable is set before validation .