function validateFormIO( form_validation_results ) { for ( var r = form_validation_results.length-1; r >= 0; r-- ) { var data = form_validation_results[r].split(':'); if ( data[1] == 'false' ) { switch( data[0] ) { case '': alert('Has d\'omplir tots els camps obligatoris (*)'); return false; case 'email': alert('Email incorrecte'); return false; } } } return true; }