ci sono quasi...mettendo il codice come sotto elencato...funzionano entrambi,ma come remote mi stampa il codice contenuto all'interno della jquery.validate.messages.;però non mi lascia le frasi da me inserite....
Codice PHP:
<script language="javascript">
$(document).ready(function()
{
$("#frm_studenti").validate(
{
rules:
{
user:
{
rangelength: [10, 10],
remote:
{
url: "studenti.php?action=verifica_username",
type: "post",
data:
{
username: function()
{
return $("#user").val();
}
}
}
},
email:
{
remote:
{
url: "studenti.php?action=verifica_email",
type: "post",
data:
{
email: function()
{
return $("#email").val();
}
}
}
},
messages:
{
user:
{
remote: "Username già esistente",
},
email:
{
remote: "Email già esistente",
},
}
}
});
});
</script>