How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery?http://forums.asp.net/t/1785336.aspx/1?How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+Mon, 26 Mar 2012 16:54:14 -040017853364899719http://forums.asp.net/p/1785336/4899719.aspx/1?How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery? <p>I have a radio button with values, &quot;Yes&quot; and &quot;No&quot;. If user selects &quot;Yes&quot;, the text box slides down. So it has to be validated. If user clicks &quot;No&quot;, the textbox slides up and there is no need for validation.</p> <p>I tried to use, ValidationMessageFor(model =&gt; model.TextBoxValue), but I am not able to submit the form as, it validates the text box even it is slided up.</p> 2012-03-26T13:51:30-04:004899774http://forums.asp.net/p/1785336/4899774.aspx/1?Re+How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+Re: How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery? <p>Did you check this <a href="http://stackoverflow.com/questions/2417113/asp-net-mvc-conditional-validation"> http://stackoverflow.com/questions/2417113/asp-net-mvc-conditional-validation</a></p> 2012-03-26T14:13:47-04:004899815http://forums.asp.net/p/1785336/4899815.aspx/1?Re+How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+Re: How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery? <p>That is a server side solution. But, I need to display in the clientside using Jquery or any other way before submitting the form.</p> 2012-03-26T14:24:55-04:004899991http://forums.asp.net/p/1785336/4899991.aspx/1?Re+How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+Re: How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery? <p>if you are using jquery validation, then you should define the ignore selector (say .ignore) at startup, then toggle the selector when showing the textbox.</p> 2012-03-26T15:56:57-04:004900068http://forums.asp.net/p/1785336/4900068.aspx/1?Re+How+to+validate+a+text+box+based+on+radio+button+selection+in+ASP+NET+MVC+3+and+JQuery+Re: How to validate a text box based on radio button selection in ASP.NET MVC 3 and JQuery? <p>Try this <a href="http://blogs.msdn.com/b/simonince/archive/2011/02/04/conditional-validation-in-asp-net-mvc-3.aspx"> http://blogs.msdn.com/b/simonince/archive/2011/02/04/conditional-validation-in-asp-net-mvc-3.aspx</a></p> 2012-03-26T16:54:14-04:00