Is there a way, in an ASP MVC project using unobtrusive validation, to dynamically remove the Required attribute from an element?  The element is decorated with a Required annotation in the view model.  I thought I could remove this by removing the h...
I am trying to get client-side validation working with custom annotations in an ASP.NET MVC app.  Sorry for the somewhat lengthy post.  Here is the custom attribute:  public class CustomStringLengthAttribute : ValidationAttribute, IClientValidatable...
I use MVC 3 Model Validation Attributes and jquery unobtrusive to show validation error message also use the script when form submitted return a confirm. So I need to check if the all fields are valid then return Confirm: some thing like the followin...
For some context, the DOM Hierarchy:   Layout.cshtml  > View    > Partial View   The Layout file contains:  <head>     @Scripts.Render("~/bundles/jquery")     @Scripts.Render("~/bundles/jqueryui") </head> <body>...
I can't find a way to get through this error.  I've got this code in my model  MultimediaLanguageEdit.cs  public class MultimediaLanguageEdit {      //[RegularExpression(@"((?<=^https?://(www\.)?youtube\.com/.*v=)\w+)|((?<=^https?:/...
How would you add @Html.ValidationMessageFor() for each item in a collection? Say,  public class FooVm {   // some property   public ICollection<BarVm> Bars { get; set; } }  public class BarVm {   // some property   [Range(1, int.Max, ErrorMess...
I am building a search form which needs multiple fields. A radio button indicates which fields are required for input like so :  [ ] Field 1 [.] Field 2     Field 3 [ ] Field 4   In the above case, Field 2 and Field 3 are now required since the assoc...
I am using jquery unobtrusive validation and my input looks like. so my input is allowed to have   <input class="FormElement form-control input-validation-error" data-val="true" data-val-required="The ID field is required."...
I'm trying to validate Google Captcha and my form, which currently does work. I'm using JQuery Forms and Validate Unobstructive. The problem is after submission, you can still submit the form as many times as you click.   Is there a way to en...
this is the first question i ask here.  I have a fieldset which has inside 4 inputs. I want to validate the form if at least 2 of 4 are completed. I can get the value of the first input with $("#communications input").val().   <fieldset cl...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.