Looping through variables, Applying a function
Hi Everyone,
Im currently doing server side validation, and trying to validate user input for valid charaters. I have written a Function to handle this and works really well. How ever im trying to applying it to multiple variables.
What i need to do is formulate a loop to check IsValidChar on variable i assign to be checked.
Eg, I have 4 variables FirstName, LastName, Email, Password
I want to check FirstName, LastName and Password if they are valid Characters.
I know i can do if statements for them(see below) but i want to save time and reduce coding) here is my example:
<%
If IsCharValid(VariableBeingChecked) = false Then
ErrMsg = VariableBeingChecked & " Contains Invalid Characters<BR>"
End If
%>
Thanks in advance
PS. Thankyou Ken for your excellent Validation on OpenStatic
Tim :)
TDA
__________________
TDA
|