|
-
December 10th, 2008, 06:25 PM
#32
Re: Object Validation
Sorry, but I don't know how to create a validator for a boolean field if I always need to have a validator assigned.
I can't even assign it to Validator class and use the default "do nothing" field because that field had to change. Since the last example you gave me returned a boolean, the "do nothing" function had to be modified.
So now, it technically does something.
Code:
public class Validator<T>
{
public virtual bool Validate(T data) { return false; }
}
Three5Eight
Using: MS C# 08 EE, MS SQL 05 EE, C++ .Net 08 EE, Vista Home Premium, XP Home
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|