  wFORMS.functionName_formValidation = "doPostBack";
  function doPostBack(e) { 
    if(!e) e = window.event;    
    
    //  call the default error management.  
    if(wFORMS.behaviors['validation'].run(e)) {            
      //  doing our custom validation here:

      // if needed, the form element can be obtained with:
      // var f = wFORMS.helpers.getSourceElement(e);

      var passwordField = document.getElementById('senha');
      var confirmField  = document.getElementById('senha2');
	  
	  if (passwordField.value) {
		  	var invalid = " "; // espaço = caractere invalido
			var minLength = 6; // mínimo de caracteres
		  
			if (passwordField.value.length < minLength) {
				 var errorMessage = "Sua senha deve possuir no mínimo 6 caracteres.";
				 wFORMS.behaviors['validation'].showError(confirmField, errorMessage);
				// we need to prevent the submission:
				return wFORMS.helpers.preventEvent(e);
			} else if (passwordField.value.indexOf(invalid) > -1) {
				 var errorMessage = "Espaço em branco não é permitido na senha.";
				 wFORMS.behaviors['validation'].showError(confirmField, errorMessage);
				// we need to prevent the submission:
				return wFORMS.helpers.preventEvent(e);
			}
	  } 
              
      if(passwordField.value != confirmField.value) {
        // passwords don't match, show error message:
        var errorMessage = "Senhas não conferem.";
        wFORMS.behaviors['validation'].showError(confirmField, errorMessage);
		passwordField.className += ' errFld ';
        // we need to prevent the submission:
        return wFORMS.helpers.preventEvent(e);     
      }
      // otherwise all is good, 
      return true;                        
  }
  }