<p>I am implementing a validation class in classic ASP. How should the validation class interface with my other classes? </p>

<p>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:</p>

<pre><code>Class User
  Property Let Email(EmailInput)
     If (myValidation.isEmail(EmailInput)) then
        mEmail = EmailInput
     Else
        mError = "Invalid Email Address format."
     End If
</code></pre>

<p>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?</p>

<p>Any suggestions for a validation architecture I should review as a benchmark?</p>

I would suggest looking at Validator related classes provided by .net framework.
In your case, you can have a Validator Class (EmailValidator to be specific), which could have a method named Validate which takes a string, returns a boolean
You could also pass ErrorMessage as one of the parameters of the Validate function
e.g.
```
```
Psuedo Code.

class EmailValidator
...
function Validate(byval EmailAddress as string, optional byval Result as string) as boolean)
..
if (condition success)
result = success
elseif (emailafddress doesnt have @)
result = "invalid email address. missing @"
endif
end function
end class
```
```
You can take error message out, if you want to have control over it.
I invite fellow SO guys to suggest any shortcomings in this.