Validation Strategy

Posts   
 
    
lotek
User
Posts: 56
Joined: 14-Sep-2005
# Posted on: 29-Mar-2010 20:07:50   

I am trying to come up with a creative way to do soft validations both at the entity level and collection level. Consider the following:

-A mobile phone number and a work phone number are suggested. -The drivers license state is not the same as the state of residence. -The credit card expires in less than 30 days. -At least one form of identification is suggested.

Anyone care to point me in the right direction?

Thanks, Matt

Seth avatar
Seth
User
Posts: 204
Joined: 25-Mar-2006
lotek
User
Posts: 56
Joined: 14-Sep-2005
# Posted on: 29-Mar-2010 20:21:23   

Yes, but it seems like all that information is specific to validating an entity and not necessarily a collection.

To do a soft validation to warn the user, would i use IDataErrorInfo? Or create a custom type of exception so the application could handle them appropriately? The users still need to save the records, i just need a way to warn them.

Thanks, Matt

Seth avatar
Seth
User
Posts: 204
Joined: 25-Mar-2006
# Posted on: 29-Mar-2010 20:25:11   

What type of app are you building? Web or Win?

lotek
User
Posts: 56
Joined: 14-Sep-2005
# Posted on: 29-Mar-2010 20:25:46   

3 tier Web

Seth avatar
Seth
User
Posts: 204
Joined: 25-Mar-2006
# Posted on: 29-Mar-2010 20:28:34   

MVC or ASP.NET STD?

--EDIT Here was my suggestion for an MVC style app: http://llblgen.com/TinyForum/Messages.aspx?ThreadID=16801

lotek
User
Posts: 56
Joined: 14-Sep-2005
# Posted on: 29-Mar-2010 20:28:57   

ASP.NET std