What I'm trying to do is validate an entry that a user types in. I'm trying to use wildcards but I'm not sure how. I want to make sure that no commas, double quotes, and single quotes are in the text entered by the user. My database statement can't handle those entries so I need to keep them out. How do I do it in VBScript in a ASP document?
Also I don't know how to check for Double quotes? What do I wrap around them to make them be seen as double quotes?
function validate()
bugtitle=Request.Form("Title"
bugdesc=Request.Form("Description"
bugbf=Request.Form("BuildFixed"
bugbr=Request.Form("BuildReported"
If bugtitle="*,*" OR bugtitle="*'*" OR bugdesc="*,*" OR bugdesc="*'*" OR bugbf="*,*" OR bugbf="*'*" OR bugbr="*,*" OR bugbr="*'*" Then
Response.Write "Please do not use any single quotes, double quotes or comma characters in your bug report. Thanks!"
End If
End Function
Also I don't know how to check for Double quotes? What do I wrap around them to make them be seen as double quotes?
function validate()
bugtitle=Request.Form("Title"
bugdesc=Request.Form("Description"
bugbf=Request.Form("BuildFixed"
bugbr=Request.Form("BuildReported"
If bugtitle="*,*" OR bugtitle="*'*" OR bugdesc="*,*" OR bugdesc="*'*" OR bugbf="*,*" OR bugbf="*'*" OR bugbr="*,*" OR bugbr="*'*" Then
Response.Write "Please do not use any single quotes, double quotes or comma characters in your bug report. Thanks!"
End If
End Function