<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>foolproof Discussions Rss Feed</title><link>http://foolproof.codeplex.com/Thread/List.aspx</link><description>foolproof Discussions Rss Description</description><item><title>New Post: Manually trigger foolproof validation</title><link>http://foolproof.codeplex.com/discussions/442479</link><description>&lt;div style="line-height: normal;"&gt;I'm using Foolproof Validation so I can use [RequiredIf] attributes on my view model. The problem is that I'd like to trigger validation within my code using the same logic outside a controller.&lt;br /&gt;
&lt;br /&gt;
I've tried creating my own validation context and using Validatior.TryValidateObject; however, it fails with Foolproof's custom RequiredIf validator. Is there a way to take my model and validate it other than passing it to a controller?&lt;br /&gt;
&lt;br /&gt;
Am I using the wrong approach?&lt;br /&gt;
&lt;br /&gt;
Here is my code:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;var draftModel = _draftHelper.LoadDraft(draftId);

var validationResults = new List&amp;lt;ValidationResult&amp;gt;();

var vc = new ValidationContext(draftModel, null, null);

var isValidDraft = Validator.TryValidateObject(draftModel, vc, 
                                               validationResults, true);&lt;/code&gt;&lt;/pre&gt;

And the error I get is on the TryValidateObject line&lt;br /&gt;
&lt;blockquote&gt;
System.NotImplementedException: The method or operation is not implemented.&lt;br /&gt;
&lt;/blockquote&gt;
I've also posted on &lt;a href="http://stackoverflow.com/questions/16349928/manually-trigger-foolproof-validation" rel="nofollow"&gt;StackOverflow&lt;/a&gt;, but I'll update both posts with the answer when I find it.&lt;br /&gt;
&lt;/div&gt;</description><author>thelameduck</author><pubDate>Fri, 03 May 2013 16:59:27 GMT</pubDate><guid isPermaLink="false">New Post: Manually trigger foolproof validation 20130503045927P</guid></item><item><title>New Post: Why do we need to implement IsValid in ModelAwareValidationAttribute ?</title><link>http://foolproof.codeplex.com/discussions/442069</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
I just downloaded the source code, imported the files into my own project and tried to implement my frist validator (a  RequiredIsTrue)&lt;br /&gt;
When I executed the project I got an exception. The IsValid method in ModelAwareValidationAttribute.cs had fired a NotImplementedException.&lt;br /&gt;
&lt;br /&gt;
Was quite surprised that this method fired.&lt;br /&gt;
Doesn't the specific validators, like RequiredIfTrue have their own validators??&lt;br /&gt;
&lt;br /&gt;
Is there something I'm missing or is it supposed to work like this?&lt;br /&gt;
In case of the latter, I'd like some advice on how to implement a simple solution where I can just leave the validation up to the specific data annotation validators themselves and don't have to write any custom code in the ModelAwareValidationAttribute.&lt;br /&gt;
&lt;br /&gt;
Note that If I do implement the isValid method (for instance set it to always return true), all aspects of the validation do work as expected. It's just that I don't WANT to have to perform the validation in that method...&lt;br /&gt;
&lt;/div&gt;</description><author>DrKawashima</author><pubDate>Tue, 30 Apr 2013 12:20:43 GMT</pubDate><guid isPermaLink="false">New Post: Why do we need to implement IsValid in ModelAwareValidationAttribute ? 20130430122043P</guid></item><item><title>New Post: Minor suggestion to remove cultural bias from project home page examples</title><link>http://foolproof.codeplex.com/discussions/442035</link><description>&lt;div style="line-height: normal;"&gt;The fourth example on the project home page (for Required Validation) uses &amp;quot;FirstName&amp;quot; and &amp;quot;LastName&amp;quot;, which are culturally biased terms.&lt;br /&gt;
&lt;br /&gt;
This is just a minor suggestion to change them to be GivenName and Surname (or GivenName and FamilyName), which are more culturally neutral.&lt;br /&gt;
&lt;br /&gt;
For an in depth discussion of the issue see: &lt;a href="http://www.w3.org/International/questions/qa-personal-names" rel="nofollow"&gt;http://www.w3.org/International/questions/qa-personal-names&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>sgryphon</author><pubDate>Tue, 30 Apr 2013 03:00:59 GMT</pubDate><guid isPermaLink="false">New Post: Minor suggestion to remove cultural bias from project home page examples 20130430030059A</guid></item><item><title>New Post: Custom Validation no client side validation</title><link>http://foolproof.codeplex.com/discussions/438971</link><description>&lt;div style="line-height: normal;"&gt;With MVC4 there is an interface which has to be implemented which isn't implemented within foolproof, I have created my own subset of annotations based upon the very good foolproof code which does implement the interface and this works perfectly with mvcfoolprooj.unobtrusive.js. The interface is &lt;strong&gt;IClientValidatable&lt;/strong&gt;.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;public abstract class ModelAwareAttribute : ValidationAttribute, IClientValidatable
{
  //...
  public IEnumerable&amp;lt;ModelClientValidationRule&amp;gt; GetClientValidationRules(ModelMetadata metadata, ControllerContext context)
  {
    yield return new ModelClientValidationRule()
    {
      ErrorMessage = ErrorMessage,
      ValidationType = &amp;quot;is&amp;quot;
    };
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;</description><author>Lukehenners</author><pubDate>Mon, 22 Apr 2013 12:53:13 GMT</pubDate><guid isPermaLink="false">New Post: Custom Validation no client side validation 20130422125313P</guid></item><item><title>New Post: Custom Validation no client side validation</title><link>http://foolproof.codeplex.com/discussions/438971</link><description>&lt;div style="line-height: normal;"&gt;Hello all,&lt;br /&gt;
&lt;br /&gt;
I tried to implement the example in&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.nickriggs.com/posts/build-model-aware-custom-validation-attributes-in-asp-net-mvc-2/" rel="nofollow"&gt;http://www.nickriggs.com/posts/build-model-aware-custom-validation-attributes-in-asp-net-mvc-2/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
But the custom client side validation is not happening.&lt;br /&gt;
&lt;br /&gt;
I am using MVC 4.0.&lt;br /&gt;
&lt;br /&gt;
I have used &lt;a href="mailto:@Scripts.Render(&amp;quot;~/Scripts/mvcfoolproof.unobtrusive.min.js&amp;quot;)" rel="nofollow"&gt;@Scripts.Render("~/Scripts/mvcfoolproof.unobtrusive.min.js")&lt;/a&gt; in my View.&lt;br /&gt;
&lt;br /&gt;
Please advise on what m I missing.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;/div&gt;</description><author>jaina</author><pubDate>Wed, 03 Apr 2013 15:08:25 GMT</pubDate><guid isPermaLink="false">New Post: Custom Validation no client side validation 20130403030825P</guid></item><item><title>New Post: Entity Framework Not Implemented Exception *Solution*</title><link>http://foolproof.codeplex.com/discussions/405505</link><description>&lt;div style="line-height: normal;"&gt;A sample?&lt;br /&gt;
&lt;/div&gt;</description><author>manuel0081</author><pubDate>Wed, 20 Feb 2013 14:29:57 GMT</pubDate><guid isPermaLink="false">New Post: Entity Framework Not Implemented Exception *Solution* 20130220022957P</guid></item><item><title>New Post: Entity Framework Not Implemented Exception *Solution*</title><link>http://foolproof.codeplex.com/discussions/405505</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;If&amp;nbsp;you are getting the&amp;nbsp;Not Implemented Exception on your EF Models, this is what I did to *fix* it:&lt;/p&gt;
&lt;p&gt;My solution has a&amp;nbsp;domain project (POCO) with the repositories in there too and a website project.&lt;/p&gt;
&lt;p&gt;I was trying to&amp;nbsp;utilize&amp;nbsp;the same POCO models as the models website, adding the [RequiredIfEmpty(&amp;quot;field&amp;quot;)] anotations right there.&amp;nbsp;bad idea to begin with, I know.&lt;/p&gt;
&lt;p&gt;What I ended up doing was creating ViewModels on the website with all the fields as the POCO plus the validation Annotations, &amp;nbsp;i also added&amp;nbsp;&lt;a title="Automapper" href="https://github.com/AutoMapper/AutoMapper"&gt;AutoMapper&lt;/a&gt;&amp;nbsp;to map the POCO
 and the ViewModels easily.&lt;/p&gt;
&lt;p&gt;By doing this i was able to fully utilize the&lt;/p&gt;
&lt;div style="display:inline!important"&gt;&lt;a id="ProjectTitle1" href="http://foolproof.codeplex.com/"&gt;MVC Foolproof Validation&lt;/a&gt;. not only that but my solution is a lot more decoupled and the domain is a lot lighter.&lt;/div&gt;
&lt;p&gt;while this doesn't really solves the&amp;nbsp;Not Implemented Exception, it gives you a work around it.&lt;/p&gt;
&lt;div style="display:inline!important"&gt;hope this helps.&lt;/div&gt;
&lt;/div&gt;</description><author>shuzz</author><pubDate>Tue, 04 Dec 2012 11:26:21 GMT</pubDate><guid isPermaLink="false">New Post: Entity Framework Not Implemented Exception *Solution* 20121204112621A</guid></item><item><title>New Post: RequiredIfTrue client side validation</title><link>http://foolproof.codeplex.com/discussions/394183</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hey guys. I made a quick example project using Robelind's&amp;nbsp;original&amp;nbsp;example. The only thing I changed was adding a hidden input for the bool property like I mentioned before. Clientside seems validation works fine in MVC 4. Hope this helps:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://dl.dropbox.com/u/73019/Examples/QuickTest.zip"&gt;https://dl.dropbox.com/u/73019/Examples/QuickTest.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>nickriggs</author><pubDate>Tue, 27 Nov 2012 14:34:33 GMT</pubDate><guid isPermaLink="false">New Post: RequiredIfTrue client side validation 20121127023433P</guid></item><item><title>New Post: RequiredIfTrue client side validation</title><link>http://foolproof.codeplex.com/discussions/394183</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Sorry to nag you, but will there be an update for MVC 4?&lt;/p&gt;
&lt;/div&gt;</description><author>robelind</author><pubDate>Tue, 27 Nov 2012 13:22:27 GMT</pubDate><guid isPermaLink="false">New Post: RequiredIfTrue client side validation 20121127012227P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi Nick&lt;br&gt;
Thanx for the help. Works in my test app. Will test it in my main aplication and let you know as well.&lt;/p&gt;
&lt;p&gt;Regards&lt;br&gt;
Piro&lt;/p&gt;
&lt;div&gt;On Nov 22, 2012 4:31 PM, &amp;quot;nickriggs&amp;quot; &amp;lt;&lt;a href="mailto:notifications@codeplex.com"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt; wrote:&lt;br type="attribution"&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: nickriggs&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;In order to validate against the second property client-side, it has to be represented in the HTML. For example:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style=""&gt;
&lt;pre&gt;@Html.HiddenFor(m =&amp;gt; m.TestValueTwo)
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, in this example, the model would be null since you are not passing it to the view from the controller. You would need to change your action result to following so the value of &amp;quot;true&amp;quot; actually gets applied to the rendered hidden input box.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style=""&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt; View(&lt;span style="color:blue"&gt;new&lt;/span&gt; TestFoolproofModel());
&lt;/pre&gt;
&lt;/div&gt;
That should work for you. Let me know.
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://foolproof.codeplex.com/discussions/403451#post945669" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:foolproof@discussions.codeplex.com?subject=[foolproof:403451]" target="_blank"&gt;foolproof@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:foolproof@discussions.codeplex.com" target="_blank"&gt;
foolproof@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://foolproof.codeplex.com/discussions/403451/unsubscribe/" target="_blank"&gt;
unsubscribe&lt;/a&gt; on CodePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>pirovorster</author><pubDate>Thu, 22 Nov 2012 16:09:02 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121122040902P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;In order to validate against the second property client-side, it has to be represented in the HTML. For example:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;@Html.HiddenFor(m =&amp;gt; m.TestValueTwo)
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, in this example, the model would be null since you are not passing it to the view from the controller. You would need to change your action result to following so the value of &amp;quot;true&amp;quot; actually gets applied to the rendered hidden input box.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt; View(&lt;span style="color:blue"&gt;new&lt;/span&gt; TestFoolproofModel());
&lt;/pre&gt;
&lt;/div&gt;
That should work for you. Let me know.&amp;nbsp;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>nickriggs</author><pubDate>Thu, 22 Nov 2012 14:31:10 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121122023110P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;Send it to &lt;a href="mailto:nicholasriggs@gmail.com"&gt;nicholasriggs@gmail.com&lt;/a&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Wed, Nov 21, 2012 at 11:17 AM, pirovorster &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:notifications@codeplex.com" target="_blank"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: pirovorster&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;Hi Nick&lt;/p&gt;
&lt;p&gt;I have a test application. Where can I send it?&lt;/p&gt;
&lt;p&gt;In the mean time here is more info&lt;/p&gt;
&lt;p&gt;My View&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style=""&gt;
&lt;pre&gt;@model TestMvc.Models.TestFoolproofModel

@{
    Layout = null;
}

&lt;span style="color:blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color:#a31515"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color:red"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;meta&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;viewport&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;content&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;width=device-width&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;Index&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    @Scripts.Render(&amp;quot;~/bundles/foolproof&amp;quot;)
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;fieldset&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;legend&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;Credentials&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;legend&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ol&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;li&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
                    @Html.LabelFor(m =&amp;gt; m.TestValueOne)
                    @Html.TextBoxFor(m =&amp;gt; m.TestValueOne)
                &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;li&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;

            &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ol&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;fieldset&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;value&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;Register&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;My Bundel
&lt;div style=""&gt;&lt;pre&gt; &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterBundles(BundleCollection bundles)
 {
      bundles.Add(&lt;span style="color:blue"&gt;new&lt;/span&gt; ScriptBundle(&lt;span style="color:#a31515"&gt;&amp;quot;~/bundles/foolproof&amp;quot;&lt;/span&gt;).Include(

      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery-1.8.2.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.unobtrusive-ajax.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.validate.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.validate.unobtrusive.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/mvcfoolproof.unobtrusive.js&amp;quot;&lt;/span&gt;));

}&lt;br&gt;&lt;br&gt;&lt;br&gt;My Model&lt;pre&gt; &lt;div style=""&gt;&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; TestFoolproofModel
 {
       [RequiredIfTrue(&lt;span style="color:#a31515"&gt;&amp;quot;TestValueTwo&amp;quot;&lt;/span&gt;)]
       &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; TestValueOne { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }
       &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; TestValueTwo { &lt;span style="color:blue"&gt;get&lt;/span&gt; { &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;; } }
 }
&lt;br&gt;&lt;br&gt;&lt;br&gt;Whenever I click on the Register button in my view I get &lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;br&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://foolproof.codeplex.com/discussions/403451#post945240" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:foolproof@discussions.codeplex.com?subject=[foolproof:403451]" target="_blank"&gt;foolproof@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:foolproof@discussions.codeplex.com" target="_blank"&gt;
foolproof@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://foolproof.codeplex.com/subscriptions/thread/project/edit" target="_blank"&gt;
unsubscribe or change your settings&lt;/a&gt; on codePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&lt;a href="http://codeplex.com" target="_blank"&gt;codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br clear="all"&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
-- &lt;br&gt;
Nick Riggs
&lt;div&gt;&lt;a href="http://twitter.com/nickriggs" target="_blank"&gt;twitter&lt;/a&gt; | &lt;a href="http://nickriggs.com" target="_blank"&gt;
blog&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>nickriggs</author><pubDate>Wed, 21 Nov 2012 21:55:42 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121121095542P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi Nick&lt;/p&gt;
&lt;p&gt;I have a test application. Where can I send it?&lt;/p&gt;
&lt;p&gt;In the mean time here is more info&lt;/p&gt;
&lt;p&gt;My View&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;@model TestMvc.Models.TestFoolproofModel

@{
    Layout = null;
}

&lt;span style="color:blue"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color:#a31515"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color:red"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;meta&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;viewport&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;content&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;width=device-width&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;Index&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;title&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    @Scripts.Render(&amp;quot;~/bundles/foolproof&amp;quot;)
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;head&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;fieldset&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;legend&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;Credentials&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;legend&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;ol&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;li&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
                    @Html.LabelFor(m =&amp;gt; m.TestValueOne)
                    @Html.TextBoxFor(m =&amp;gt; m.TestValueOne)
                &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;li&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;

            &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;ol&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;fieldset&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;input&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;submit&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;value&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;quot;Register&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;div&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;body&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;html&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;br&gt;My Bundel
&lt;div style="color:black; background-color:white"&gt;&lt;pre&gt; &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterBundles(BundleCollection bundles)
 {
      bundles.Add(&lt;span style="color:blue"&gt;new&lt;/span&gt; ScriptBundle(&lt;span style="color:#a31515"&gt;&amp;quot;~/bundles/foolproof&amp;quot;&lt;/span&gt;).Include(

      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery-1.8.2.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.unobtrusive-ajax.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.validate.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/jquery.validate.unobtrusive.js&amp;quot;&lt;/span&gt;,
               
      &lt;span style="color:#a31515"&gt;&amp;quot;~/Scripts/mvcfoolproof.unobtrusive.js&amp;quot;&lt;/span&gt;));

}&lt;br&gt;&lt;br&gt;&lt;br&gt;My Model&lt;pre&gt; &lt;div style="color:black; background-color:white"&gt;&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; TestFoolproofModel
 {
       [RequiredIfTrue(&lt;span style="color:#a31515"&gt;&amp;quot;TestValueTwo&amp;quot;&lt;/span&gt;)]
       &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; TestValueOne { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }
       &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; TestValueTwo { &lt;span style="color:blue"&gt;get&lt;/span&gt; { &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;true&lt;/span&gt;; } }
 }
&lt;br&gt;&lt;br&gt;&lt;br&gt;Whenever I click on the Register button in my view I get 
&lt;/pre&gt;
&lt;a&gt;
&lt;pre title="dependentValue = dependentPropertyElement[0].value;"&gt;dependentValue = dependentPropertyElement[0].value;
in  mvcfoolproof.unobtrusive.js -line 100&lt;br&gt;&lt;/pre&gt;
&lt;/a&gt; and then a postback&lt;/div&gt;
&lt;/pre&gt;
&lt;br&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>pirovorster</author><pubDate>Wed, 21 Nov 2012 17:17:46 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121121051746P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;I might be able to help with more information. You might need to throw together a small project with a sample model that duplicates the issue to post.&lt;/div&gt;</description><author>nickriggs</author><pubDate>Wed, 21 Nov 2012 13:54:02 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121121015402P</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Any help?&lt;/p&gt;
&lt;/div&gt;</description><author>pirovorster</author><pubDate>Wed, 21 Nov 2012 08:13:47 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121121081347A</guid></item><item><title>New Post: TypeError: dependentPropertyElement[0] is undefined</title><link>http://foolproof.codeplex.com/discussions/403451</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;&lt;strong&gt;I get this error when I submit my page&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;TypeError: dependentPropertyElement[0] is undefined&lt;/span&gt;&lt;/div&gt;
&lt;table cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img title="Break On This Error" src="" alt=""&gt;&lt;/td&gt;
&lt;td&gt;&lt;a&gt;
&lt;pre title="dependentValue = dependentPropertyElement[0].value;"&gt;dependentValue = dependentPropertyElement[0].value;&lt;/pre&gt;
&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;mvcfoolproof.unobtrusive.js -line 100&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My Current scripts are&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;http://localhost:3248/Scripts/jquery-1.8.2.js&lt;/p&gt;
&lt;p&gt;http://localhost:3248/Scripts/jquery.unobtrusive-ajax.js&lt;/p&gt;
&lt;p&gt;http://localhost:3248/Scripts/jquery.validate.js&lt;/p&gt;
&lt;p&gt;http://localhost:3248/Scripts/jquery.validate.unobtrusive.js&lt;/p&gt;
&lt;p&gt;http://localhost:3248/Scripts/mvcfoolproof.unobtrusive.js&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have read http://foolproof.codeplex.com/discussions/227722,&lt;/strong&gt; but the build seems to be much earlier so I assume it is not that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What am I missing?&lt;/p&gt;
&lt;/div&gt;</description><author>pirovorster</author><pubDate>Fri, 16 Nov 2012 09:10:07 GMT</pubDate><guid isPermaLink="false">New Post: TypeError: dependentPropertyElement[0] is undefined 20121116091007A</guid></item><item><title>New Post: I need a combination of requiredIf and greaterthanorequalto.</title><link>http://foolproof.codeplex.com/discussions/400378</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I think a single custom validator could work for you if you created a model class to represent a row. So a row class that&amp;nbsp;looking&amp;nbsp;something like:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;class SomethingRowModel{
 
    prop Radio;
    prop TexBox;
    prop Count;
    ect;

}&lt;/pre&gt;
&lt;p&gt;Then in your main model, Instead of have a bunch of duplicated properties for your six rows, just have six properties for each row of your new SothingRowModel class.&lt;/p&gt;
&lt;p&gt;You can then apply the validator to the&amp;nbsp;SothingRowModel once, and it should work for all your rendered rows.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>nickriggs</author><pubDate>Tue, 23 Oct 2012 18:38:58 GMT</pubDate><guid isPermaLink="false">New Post: I need a combination of requiredIf and greaterthanorequalto. 20121023063858P</guid></item><item><title>New Post: I need a combination of requiredIf and greaterthanorequalto.</title><link>http://foolproof.codeplex.com/discussions/400378</link><description>&lt;div style="line-height: normal;"&gt;Oh I see, so I need to specify the fields, such as model.Firstname instead of somehow passing it in later. I had hoped to pass it in because I had planned to use this custom attribute on 6 different properties.
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Basically I have 6 sets made up of (radio buttons, textboxes, button, counter, table). The user clicks Yes radio, fills in hte textboxes, and clicks the button which increments the counter and moves the textbox values to the table. I think the simplest
 thing is to put a custom attribute on each counter (which each have different names) that says (if &amp;quot;&amp;lt;enter radio button name&amp;gt; is true, then &amp;lt;this&amp;gt; needs to be &amp;gt; 0).&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;So is this example I have been using, capable of getting me here, or will I need to write 6 custom attributes, naming specific properties in the model?&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Thank you again for all your help on this.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Simon.&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Tue, Oct 23, 2012 at 10:36 AM, nickriggs &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:notifications@codeplex.com" target="_blank"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: nickriggs&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;Yes, you should be using ModelAware because it will expose the entire model to you instead of just the property value of the contingent property.&lt;/p&gt;
&lt;p&gt;You can't change the signature of the IsValid, it has to implement it as it exists in the abstract base class. It should look like this in your class:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style=""&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;bool&lt;/span&gt; IsValid(&lt;span style="color:blue"&gt;object&lt;/span&gt; value, &lt;span style="color:blue"&gt;object&lt;/span&gt; container)
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The container variable, will be your model, just cast it to your model's type, like in the example I provided:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style=""&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; model = (YourModelTypeHere)container;
&lt;/pre&gt;
&lt;/div&gt;
Once you have typed model, you will have access to the two properties you need to property evaluate if it's valid.
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://foolproof.codeplex.com/discussions/400378#post931222" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:foolproof@discussions.codeplex.com?subject=[foolproof:400378]" target="_blank"&gt;foolproof@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:foolproof@discussions.codeplex.com" target="_blank"&gt;
foolproof@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://foolproof.codeplex.com/discussions/400378/unsubscribe/" target="_blank"&gt;
unsubscribe&lt;/a&gt; on CodePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>battlfrog</author><pubDate>Tue, 23 Oct 2012 18:07:26 GMT</pubDate><guid isPermaLink="false">New Post: I need a combination of requiredIf and greaterthanorequalto. 20121023060726P</guid></item><item><title>New Post: I need a combination of requiredIf and greaterthanorequalto.</title><link>http://foolproof.codeplex.com/discussions/400378</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Yes, you should be using ModelAware because it will expose the entire model to you instead of just the property value of the contingent property.&lt;/p&gt;
&lt;p&gt;You can't change the signature of the IsValid, it has to implement it as it exists in the abstract base class. It should look like this in your class:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;bool&lt;/span&gt; IsValid(&lt;span style="color: blue;"&gt;object&lt;/span&gt; value, &lt;span style="color: blue;"&gt;object&lt;/span&gt; container)
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;container variable, will be your model, just cast it to your model's type, like in the example I provided:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; model = (YourModelTypeHere)container;
&lt;/pre&gt;
&lt;/div&gt;
Once you have typed model, you will have access to the two properties you need to property&amp;nbsp;evaluate&amp;nbsp;if it's valid.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>nickriggs</author><pubDate>Tue, 23 Oct 2012 17:36:52 GMT</pubDate><guid isPermaLink="false">New Post: I need a combination of requiredIf and greaterthanorequalto. 20121023053652P</guid></item><item><title>New Post: I need a combination of requiredIf and greaterthanorequalto.</title><link>http://foolproof.codeplex.com/discussions/400378</link><description>&lt;div style="line-height: normal;"&gt;Hello Again,
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Are you starting to regret answering my initial email yet? ;-) &lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;I have put this together based off your post:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;public class RequiredIfTrueAndGreaterThanAttribute : ModelAwareValidationAttribute&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;// Register the new attribute with the Foolproof library&lt;/div&gt;
&lt;div&gt;static RequiredIfTrueAndGreaterThanAttribute()&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;Register.Attribute(typeof(RequiredIfTrueAndGreaterThanAttribute));&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;public override bool IsValid(bool radioValue, int counterValue)&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;if (radioValue == true)&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;if (counterValue == 0)&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;return false;&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;else if (counterValue &amp;gt; 0)&lt;/div&gt;
&lt;div&gt;{&lt;/div&gt;
&lt;div&gt;return true;&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;return true;&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;div&gt;}&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;I get 2 errors:&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;1&lt;span style="white-space:pre"&gt; &lt;/span&gt;'EligibityForm.RequiredIfTrueAndGreaterThanAttribute' does not implement inherited abstract member 'Foolproof.ModelAwareValidationAttribute.IsValid(object, object)'&lt;span style="white-space:pre"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;and&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;2&lt;span style="white-space:pre"&gt; &lt;/span&gt;'EligibityForm.RequiredIfTrueAndGreaterThanAttribute.IsValid(bool, int)': no suitable method found to override.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Any advice?&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;Simon.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Tue, Oct 23, 2012 at 8:06 AM, Simon Rodgers &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:teahou@gmail.com" target="_blank"&gt;teahou@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
Nick,
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;I have been reading over the source code at Foolproof.Codeplex and I am wondering if I should be inheriting from ContingentValidationAttribute, instead of ModelAwareValidationAttribute. I am wondering because both the Is and the RequiredIf classes inherit
 from ContingentValidationAttribute and those are the attributes I am trying to combine.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;div&gt;What say you?&lt;/div&gt;
&lt;span&gt;&lt;font color="#888888"&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;font color="#888888"&gt;Simon&lt;/font&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Tue, Oct 23, 2012 at 7:16 AM, Simon Rodgers &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:teahou@gmail.com" target="_blank"&gt;teahou@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
Great, thank you so much Nick, I have been banging my head against this for a couple days now. Have a great day!&lt;span&gt;&lt;font color="#888888"&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;font color="#888888"&gt;Simon.&lt;/font&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&lt;div&gt;On Tue, Oct 23, 2012 at 7:15 AM, nickriggs &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:notifications@codeplex.com" target="_blank"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: nickriggs&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;You have to create the client side scripts if you want client side validation:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.nickriggs.com/posts/client-side-model-aware-validation/" target="_blank"&gt;http://www.nickriggs.com/posts/client-side-model-aware-validation/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That article was pre-&lt;span&gt;unobtrusive. So you will also have to do some rigging for that. Refer to the
&lt;span&gt;$Unob.adapters.add function calls near the bottom of this file for examples:
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;a href="http://foolproof.codeplex.com/SourceControl/changeset/view/94877#1749774" target="_blank"&gt;http://foolproof.codeplex.com/SourceControl/changeset/view/94877#1749774&lt;/a&gt;&lt;br&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://foolproof.codeplex.com/discussions/400378#post931090" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:foolproof@discussions.codeplex.com?subject=[foolproof:400378]" target="_blank"&gt;foolproof@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:foolproof@discussions.codeplex.com" target="_blank"&gt;
foolproof@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://foolproof.codeplex.com/discussions/400378/unsubscribe/" target="_blank"&gt;
unsubscribe&lt;/a&gt; on CodePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>battlfrog</author><pubDate>Tue, 23 Oct 2012 16:58:36 GMT</pubDate><guid isPermaLink="false">New Post: I need a combination of requiredIf and greaterthanorequalto. 20121023045836P</guid></item></channel></rss>