Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
86713 Points
9638 Posts
Moderator
MVP
Mar 19, 2012 09:48 AM|LINK
Check out the Mvc.ValidationToolkit which has a RequiredEmptyIfAttribute. You would apply RequiredEmptyIf("OtherField", "TargetValue") to both the textbox inputs.
http://blogs.msdn.com/b/simonince/archive/2011/09/29/mvc-validationtookit-alpha-release-conditional-validation-with-mvc-3.aspx
DarrellNorto...
All-Star
86713 Points
9638 Posts
Moderator
MVP
Re: How to validate two fields
Mar 19, 2012 09:48 AM|LINK
Check out the Mvc.ValidationToolkit which has a RequiredEmptyIfAttribute. You would apply RequiredEmptyIf("OtherField", "TargetValue") to both the textbox inputs.
http://blogs.msdn.com/b/simonince/archive/2011/09/29/mvc-validationtookit-alpha-release-conditional-validation-with-mvc-3.aspx
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.