Shadowspawn65
Programmer
I am trying to validate input from a form on an ASP page that is going into an acess database. I am using asp and found some snipets of code that look like it would do what I wanted. It used vbscript and RegExp. I set up my code similar to the example only I don't get the validation back. The example seems to indicate that it will be boolean but validate is always empty, no matter what I put into the field as a test (right now I have abcde - which should be valid).
Code:
'Fuction to check if valid data entered into fields
Function dbSafe(text)
Response.Write("I am testing """&text&""" now <br />")
%><script language="vbscript">
Dim objRegEx, Validate
Set objRegEx = New RegExp
objRegEx.Pattern = "[a-zA-Z]"
Validate = objRegEx.Test("abcde")
</script><%
If Validate then
Response.Write("data ok")
Else
Response.Write("data bad")
REsponse.Write("Validate = "&Validate)
End If
End Function