I ask similar question here but in this question I use another implementation, exactly this way the following codes show my implementations:  Model:  public class Department {      public long Id { get; set; }      [IsDateAfter("Date2", tru...
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?:/...
I have just created a new MVC 3 project and updated all the installed packages using the package manager, however I am recieving the following error:     Microsoft JScript runtime error: Unable to set value of the property   'unobtrusive': ob...
I am using jquery validation and jquery unobtrusive validation plugins. I am trying to hide error message, but error message are not hiding. I have created a js fiddle:  Fiddle Link  Following is the code which i used in the fiddle:  Html  <form i...
I am trying to parse a dynamically inserted form to add the jQuery unobtrusive validation.  I have the following AJAX function which is executed when the user is searching:  function search(el) {     var $this = $(el);     var $form = $this.closest(&...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.