Ho questa funzione:che controlla che nel modulo i numeri di telefono e fax inseriti non contengano caratteri estranei, e nel caso ve ne fossero, rimanda ad una pagina di errore....però il form viene convalidato lo stesso!! Cosa sbaglio?codice:Function StringToArray(value) Dim i,ch,ar(),nOfElm nOfElm = Len(value) if nOfElm>0 then Redim ar(nOfElm) For i=1 to nOfElm ar(i) = mid(value,i,1) Next StringToArray = ar else StringToArray = array("") end if End Function lettere = StringToArray("qazwsxedcrfvtgbyhnujmik,ol.pò-;:_é*°§èàù#][€\|!£$%&()=?^") if tel <> "" then for i=0 to ubound(lettere) -1 if tel = lettere(i) then response.redirect("errore.asp?id=27") end if next end if if fax <> "" then for i=0 to ubound(lettere) -1 if fax = lettere(i) then response.redirect("errore.asp?id=28") end if next end if
P.S.: non posso usare isNumeric perchè nei numeri di telefono possono essere compresi + e /

Rispondi quotando
