I am implementing a validation class in classic ASP. How should the validation class interface with my other classes?
My current setup: The User class's set methods call the appropriate validation method in the validation class. Any errors that occur are stored in User.mError. For example, here's my set method for the Email member variable in ASP Classic:
Class User
Property Let Email(EmailInput)
If (myValidation.isEmail(EmailInput)) then
mEmail = EmailInput
Else
mError = "Invalid Email Address format."
End If
I don't like how I'm going to need an error member variable for every object that calls my validation class. Suggestions on a better setup?
Any suggestions for a validation architecture I should review as a benchmark?