Validation

2014-10-06 Thread Greg Keogh
Using the Framework classes, is there is neat and easy way of annotating properties of a class with validation rules and then validating the rules to get the error(s)? I ask because the DataAnnotations http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations(v=vs.110).aspx

Re: Validation

2014-10-06 Thread Greg Keogh
Finally found a way of using the DataAnnotations. This guy http://aboutdev.wordpress.com/2009/12/20/poor-mans-validation/ points out the Validator http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.validator(v=vs.110).aspx class static methods. The code is a bit weird

RE: Validation

2014-10-06 Thread ILT (O)
There is a similar usage of DataAnnotations described in an article at CodeProject - http://www.codeproject.com/Articles/256183/DataAnnotations-Validation-for-Beginner I’ve found this method useful (initially discovered at MSDN Library here