public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js
function() {
		var input, inputName, state, message,
		returnedObj = { fields:{}, validate:true };
      
      // Loop on all the sub fields
      for (var i = 0 ; i < this.inputs.length ; i++) {
	
   	   input = this.inputs[i];
			inputName = input.options.name;
   	   state = input.getState();
			message = input.getStateString(state);
						
			returnedObj.fields[inputName] = {};
			returnedObj.fields[inputName].valid = true;
			returnedObj.fields[inputName].message = message;
			
			// check if subfield validates
   	   if( state == inputEx.stateRequired || state == inputEx.stateInvalid ) {
				returnedObj.fields[inputName].valid = false;
				returnedObj.validate = false;
   	   }

      }

      return returnedObj;
	}
function() {
		var input, inputName, state, message,
		returnedObj = { fields:{}, validate:true };
      
      // Loop on all the sub fields
      for (var i = 0 ; i < this.inputs.length ; i++) {
	
   	   input = this.inputs[i];
			inputName = input.options.name;
   	   state = input.getState();
			message = input.getStateString(state);
						
			returnedObj.fields[inputName] = {};
			returnedObj.fields[inputName].valid = true;
			returnedObj.fields[inputName].message = message;
			
			// check if subfield validates
   	   if( state == inputEx.stateRequired || state == inputEx.stateInvalid ) {
				returnedObj.fields[inputName].valid = false;
				returnedObj.validate = false;
   	   }

      }

      return returnedObj;
	}
function ( ) { var input , inputName , state , message , returnedObj = { fields : { } , validate : true } ; // Loop on all the sub fields for ( var i = 0 ; i < this . inputs . length ; i ++ ) { input = this . inputs [ i ] ; inputName = input . options . name ; state = input . getState ( ) ; message = input . getStateString ( state ) ; returnedObj . fields [ inputName ] = { } ; returnedObj . fields [ inputName ] . valid = true ; returnedObj . fields [ inputName ] . message = message ; // check if subfield validates if ( state == inputEx . stateRequired || state == inputEx . stateInvalid ) { returnedObj . fields [ inputName ] . valid = false ; returnedObj . validate = false ; } } return returnedObj ; }
Alternative method to validate for advanced error handling
@returns {Object} with all Forms's fields state, error message
and validate containing a boolean for the global Form validation
Alternative method to validate for advanced error handling