Hi guys,
i'm using jQuery JavaScript Library v1.4 and jQuery validation plug-
in 1.6
My code with jQuery validation plug-in 1.5 work correctly, but with
the new version NO.
The JS:
$().ready(function() {
$(#registrazione).validate({
submitHandler: function() {
checkLock('registrazione','Sei sicuro di abitare fuori
dall
\'italia?');
},
rules: {
nome_cognome:{
required: true,
minlength: 3,
maxlength: 60,
},
username: {
required: true,
minlength: 3,
maxlength: 40,
remote: /metwit/comuni/action.php,
nowhitespace: true
},
password: {
required: true,
minlength: 5
},
email: {
required: true,
email: true,
remote: /metwit/comuni/action.php
},
localita: {
required: true
},
antispam_captcha: {
required: true,
remote: /metwit/comuni/action.php
},
agree: required
},
messages: {
nome_cognome:{
required: Inserisci la tua identità,
minlength: Minimo 3 parole,
maxlength: Massimo 60 parole
},
username: {
required: Inserisci un username.,
minlength: Minimo 3 lettere.,
maxlength: Lunghezza username massima
superata.,
remote: Username in uso.,
nowhitespace: Inserisci solo caratteri e
numeri.
},
password: {
required: Inserisci una password,
minlength: Minimo 5 lettere.
},
email: {
required: Inserisci un'email.,
email: Inserisci un'email valida.,
remote: Email in uso.
},
localita: {
required: Inserisci la località da cui
segnali, selezionandola
dalla mappa sopra.
},
antispam_captcha: {
required: Inserisci il codice antispam.,
remote: Inserisci il codice antispam corretto.
},
agree: {
required: Devi accettare i termini del
servizio.
}
}
});
});
The html:
form method=POST id=registrazione
table
tr
tdNome Cognome/td
tdinput type=text name=nome_cognome/td
/tr
tr
tdUsername/td
tdinput type=text name=username/td
/tr
tr
tdPassword/td
tdinput type=password name=password/td
/tr
tr
tdEmail/td
tdinput type=text name=email/td
/tr
tr
tdMappa/td
tddiv id=map style=width:430px;
height:385px; border:1px
solid black;/div/td
/tr
tr
tdDa dove fai le tue segnalazioni?/td
td
input type=text name=localita
id=localita style=width:
400px;
input type=button id=centra
value=Trova
onclick=G.centraLoc($('#localita').val());
brspanEs:Via del Sansovino, 50142
Firenze, Italia (Puoi
trascinare il marker nella mappa nella località e via precisa in cui
abiti. ;-))/span
/td
/tr
tr