﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Custom Data Annotations With MVC: How to Check Multiple Properties at One Time</title>
	<atom:link href="http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/</link>
	<description>This is my recorded stumbling through ASP.Net, Framework 3.5, C# 3.0, Ajax, Javascript, and Love.  Stay, learn, destroy.  It's your life.</description>
	<lastBuildDate>Wed, 27 Oct 2010 11:58:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-9144</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 01 Jul 2010 15:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-9144</guid>
		<description>Yeah I think I remember that happening, but as I said it&#039;s been a while and I&#039;ve been stuck in 2.0 land for the last 4 months.  I don&#039;t think I had a solution for that at the point I made this. If I get all sorts of ambitious, I might see if can dust this off and figure it out. My guess though is this is by design. Each attribute carries a Valid flag and I wouldn&#039;t doubt that it&#039;s designed to roll through the property level validation attributes and fail if any of those is invalid, thus ignoring class level ones.</description>
		<content:encoded><![CDATA[<p>Yeah I think I remember that happening, but as I said it&#8217;s been a while and I&#8217;ve been stuck in 2.0 land for the last 4 months.  I don&#8217;t think I had a solution for that at the point I made this. If I get all sorts of ambitious, I might see if can dust this off and figure it out. My guess though is this is by design. Each attribute carries a Valid flag and I wouldn&#8217;t doubt that it&#8217;s designed to roll through the property level validation attributes and fail if any of those is invalid, thus ignoring class level ones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SJ</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-9108</link>
		<dc:creator>SJ</dc:creator>
		<pubDate>Mon, 28 Jun 2010 12:08:58 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-9108</guid>
		<description>Yes. Once the property-level issues are solved it does check the Class-level attributes.</description>
		<content:encoded><![CDATA[<p>Yes. Once the property-level issues are solved it does check the Class-level attributes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-9056</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Wed, 23 Jun 2010 20:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-9056</guid>
		<description>So you mean it picks up on the property level issues only.  Does it go onto the class level ones once that those issues are resolved?  Been a while since I&#039;ve used this.</description>
		<content:encoded><![CDATA[<p>So you mean it picks up on the property level issues only.  Does it go onto the class level ones once that those issues are resolved?  Been a while since I&#8217;ve used this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SJ</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-9038</link>
		<dc:creator>SJ</dc:creator>
		<pubDate>Tue, 22 Jun 2010 08:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-9038</guid>
		<description>Hi Sean

I tried using your code, and it seems to work fine. I have a problem though -- maybe you have a suggestion for solving it?

When I apply this ValidationAttribute to a class that has more ValidationAttributes on the property-level, and one of those fails, then the class-level ValidationAttribute is not validated eventhough it contains errors. 

Have you found a way to solve this problem ?</description>
		<content:encoded><![CDATA[<p>Hi Sean</p>
<p>I tried using your code, and it seems to work fine. I have a problem though &#8212; maybe you have a suggestion for solving it?</p>
<p>When I apply this ValidationAttribute to a class that has more ValidationAttributes on the property-level, and one of those fails, then the class-level ValidationAttribute is not validated eventhough it contains errors. </p>
<p>Have you found a way to solve this problem ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gini</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-8779</link>
		<dc:creator>Gini</dc:creator>
		<pubDate>Tue, 08 Jun 2010 20:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-8779</guid>
		<description>Nice article. I also created PostalCodeValidator using multiple fields. Worked fine until I move my entity into a user control. The &quot;IsValid&quot; is not fired anymore.... any idea?</description>
		<content:encoded><![CDATA[<p>Nice article. I also created PostalCodeValidator using multiple fields. Worked fine until I move my entity into a user control. The &#8220;IsValid&#8221; is not fired anymore&#8230;. any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-8136</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Mon, 10 May 2010 13:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-8136</guid>
		<description>I do it because I care.</description>
		<content:encoded><![CDATA[<p>I do it because I care.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-8135</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Mon, 10 May 2010 13:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-8135</guid>
		<description>Good thing you know exactly what I have and have not written.  Fact is I did hand churn this guy out for work.  If you want to accuse me of anything, accuse me of being an idiot for not taking the 2 seconds to find out I was about to re-invent the wheel.  I created this little gem because the at time built in annotations did nothing for me.  Chances are the reason this may look like someone else&#039;s implementation is because there&#039;s only so many ways to do this.

And if you&#039;re implying that something as simple as checking a class for properties and their values is beyond my grasp, I&#039;d be hurt and I don&#039;t think we could be friends.  And I want to be your friend.</description>
		<content:encoded><![CDATA[<p>Good thing you know exactly what I have and have not written.  Fact is I did hand churn this guy out for work.  If you want to accuse me of anything, accuse me of being an idiot for not taking the 2 seconds to find out I was about to re-invent the wheel.  I created this little gem because the at time built in annotations did nothing for me.  Chances are the reason this may look like someone else&#8217;s implementation is because there&#8217;s only so many ways to do this.</p>
<p>And if you&#8217;re implying that something as simple as checking a class for properties and their values is beyond my grasp, I&#8217;d be hurt and I don&#8217;t think we could be friends.  And I want to be your friend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erx</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-8052</link>
		<dc:creator>erx</dc:creator>
		<pubDate>Fri, 07 May 2010 00:42:38 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-8052</guid>
		<description>if slagging off your users was indeed your sense of humor i am sorry, but heck its hard to tell!!

+ please dont say you figured it out when you copied almost all of it :) take care.</description>
		<content:encoded><![CDATA[<p>if slagging off your users was indeed your sense of humor i am sorry, but heck its hard to tell!!</p>
<p>+ please dont say you figured it out when you copied almost all of it <img src='http://byatool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  take care.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erx</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-8051</link>
		<dc:creator>erx</dc:creator>
		<pubDate>Fri, 07 May 2010 00:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-8051</guid>
		<description>the funny thing is, not only are you rude to your audience, but you actually DID NOT WRITE THAT and this is available in the default project created by mvc 2, so if you load up VS and create new project mvc 2 application (not empty project but templated one) the default project that loads up is where it is.  if you search for PropertiesMustMatchAttribute  you will find this exact implementation - you just copied the code from there and added some comments to you - you are SUCH A LOSER!!</description>
		<content:encoded><![CDATA[<p>the funny thing is, not only are you rude to your audience, but you actually DID NOT WRITE THAT and this is available in the default project created by mvc 2, so if you load up VS and create new project mvc 2 application (not empty project but templated one) the default project that loads up is where it is.  if you search for PropertiesMustMatchAttribute  you will find this exact implementation &#8211; you just copied the code from there and added some comments to you &#8211; you are SUCH A LOSER!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7820</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Mon, 19 Apr 2010 13:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7820</guid>
		<description>You know, this was actually a point of contention the last place I worked.  I personally don&#039;t use helper methods for form building, and as for validation I hand produce jQuery Validation.  I realize the issue with a possible disconnect with the model&#039;s annotations and the jQuery Validation rules, but I just can&#039;t stand having to jack my form up to conform to the gooney way Microsoft expects the form to look.  Especially since the way it&#039;s implemented right now is dubious at best.</description>
		<content:encoded><![CDATA[<p>You know, this was actually a point of contention the last place I worked.  I personally don&#8217;t use helper methods for form building, and as for validation I hand produce jQuery Validation.  I realize the issue with a possible disconnect with the model&#8217;s annotations and the jQuery Validation rules, but I just can&#8217;t stand having to jack my form up to conform to the gooney way Microsoft expects the form to look.  Especially since the way it&#8217;s implemented right now is dubious at best.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohammad</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7781</link>
		<dc:creator>Mohammad</dc:creator>
		<pubDate>Fri, 16 Apr 2010 15:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7781</guid>
		<description>Nice Article. I wonder how the client validation works in this case since Html.ValidationMessageFor is expecting one data member of the model.</description>
		<content:encoded><![CDATA[<p>Nice Article. I wonder how the client validation works in this case since Html.ValidationMessageFor is expecting one data member of the model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7766</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 15 Apr 2010 14:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7766</guid>
		<description>Good thing the internet is full of smarter people than me.  Not that it takes much but still, good thing.</description>
		<content:encoded><![CDATA[<p>Good thing the internet is full of smarter people than me.  Not that it takes much but still, good thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astacy</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7765</link>
		<dc:creator>astacy</dc:creator>
		<pubDate>Thu, 15 Apr 2010 13:59:38 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7765</guid>
		<description>This always happens, you spend hours looking for an answer, finally post a question, then almost immediately find the answer yourself.

Anyway I found this post:  

http://www.paraesthesia.com/archive/2010/03/02/the-importance-of-typeid-in-asp.net-mvc-dataannotations-validation-attributes.aspx

It explains my problem exactly.

Thanks.</description>
		<content:encoded><![CDATA[<p>This always happens, you spend hours looking for an answer, finally post a question, then almost immediately find the answer yourself.</p>
<p>Anyway I found this post:  </p>
<p><a href="http://www.paraesthesia.com/archive/2010/03/02/the-importance-of-typeid-in-asp.net-mvc-dataannotations-validation-attributes.aspx" rel="nofollow">http://www.paraesthesia.com/archive/2010/03/02/the-importance-of-typeid-in-asp.net-mvc-dataannotations-validation-attributes.aspx</a></p>
<p>It explains my problem exactly.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astacy</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7764</link>
		<dc:creator>astacy</dc:creator>
		<pubDate>Thu, 15 Apr 2010 13:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7764</guid>
		<description>I&#039;ve implemented the same solution for password and email confirmation.  I try to use two PropertiesMatchAttribute attributes on the class, but only one is validated.  I do have AllowMultiple = true in the AttributeUsageAttribute.  Any ideas?

Thanks.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve implemented the same solution for password and email confirmation.  I try to use two PropertiesMatchAttribute attributes on the class, but only one is validated.  I do have AllowMultiple = true in the AttributeUsageAttribute.  Any ideas?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://byatool.com/mvc/custom-data-annotations-with-mvc-how-to-check-multiple-properties-at-one-time/comment-page-1/#comment-7521</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 25 Mar 2010 13:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://byatool.com/?p=1162#comment-7521</guid>
		<description>You mean as in an attribute that could be used for both?  That&#039;s a good questions and didn&#039;t really get to that yet in my use.  There might be a way within the attribute to check to see if it is assigned to a class or property, but not sure.</description>
		<content:encoded><![CDATA[<p>You mean as in an attribute that could be used for both?  That&#8217;s a good questions and didn&#8217;t really get to that yet in my use.  There might be a way within the attribute to check to see if it is assigned to a class or property, but not sure.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

