Problem with email validation: Invalid procedure call or argument: 'Mid'
Posted
by Huseyin
on Stack Overflow
See other posts from Stack Overflow
or by Huseyin
Published on 2010-03-13T20:38:38Z
Indexed on
2010/03/13
20:45 UTC
Read the original article
Hit count: 477
asp-classic
I tried to control email address and reviewer's name with the following code but I received this error.
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Mid'
Cant I compare Mid(REVIEWEREMAIL, InStr(1, REVIEWEREMAIL, "@", 1), 1) to "@"?
If Len(REVIEWERNAME) < 2 Then
with response
.write "Error! Please fill in valid name. <br />"
end with
ElseIf Len(REVIEWEREMAIL) < 3 Then
with response
.write "Error! Please fill in valid email address. <br />"
end with
ElseIf Mid(REVIEWEREMAIL, InStr(1, REVIEWEREMAIL, "@", 1), 1) <> "@" Then
with response
.write "Error! Please fill in valid email address. <br />"
end with
Else
insert...
End If
© Stack Overflow or respective owner