Ciao,
ho la seguente funzione per validare il campo e-mail di un form:
Nel momento in cui viene usata compare il seguente errore:codice:Function MailRule(strValue) strValue = trim(strValue) if not (isempty(strValue) or isnull(strValue) or strValue = "") then Set objRegExp = New RegExp objRegExp.Pattern = "^[a-z0-9._-]+\@[a-z0-9.-]{2,}+\.[a-z0-9]{2,}$" objRegExp.IgnoreCase = True objCheck = objRegExp.Test(strValue) if not objcheck then strError = "Il campo """ & strFieldName & """ " & notCorrect & " spacer " MailRule = strError end if set objRegExp = nothing end if end Function
Errore di run-time di Microsoft VBScript (0x800A139A)
Quantificatore imprevisto
La riga incriminata è:
Saluti,codice:objCheck = objRegExp.Test(strValue)
Carlo

Rispondi quotando