Questions tagged [unobtrusive-validation]

Unobtrusive Validation refers to a jQuery plugin created by Microsoft used in conjunction with the jQuery Validate plugin. It is shipped with ASP.NET MVC 3.

Unobtrusive Validation is a jQuery plugin written by Microsoft that acts as a support library for jQuery and the jQuery Validate plugin.

The script is shipped as part of ASP.NET MVC 3 and is included in new Visual Studio 2010 MVC 3 projects by default. It uses HTML5 data attributes (data-val-*) usually originating from DataAnnotation attributes on the view's model.

1239 questions
-1
votes
1 answer

Using custom jquery validation plugin in ASP.NET MVC 4

I've been wondering how can we use custom validation plugins in ASP.NET MVC 4. I've searched on the web, but I've only found how to create new validation rules creating new attributes. The question here is another: There are lots of validation…
-2
votes
1 answer

Popup dialog form behaves different than it's source: Edit view

My Index view is a representation of a table in the database. Each row has Edit button which shows Edit view displayed in a popup dialog using jQuery. My model for this table has some validations and if I provide wrong values in the Edit view it…
-2
votes
1 answer

Issue with asp-validation-for when used in a loop

I am having an issue with the asp-validation-for on a span element in the code below.
@if (Model.Property.Options.ElementAt(i).OptionTypeId == PropertyOptionType.CheckBox) { …
MCFH
  • 135
  • 3
  • 8
-2
votes
3 answers

Showing a success validation message in ASP.Net MVC from server side validation

If my server side validation passes I want to show a message that I pass back from the server to the client. Error messages are possible (defined as an attribute on the property in ASP.Net MVC), can I show a success message? Maybe I can tap into the…
chuckd
  • 13,460
  • 29
  • 152
  • 331
-2
votes
1 answer

Jquery unobstrusive validation not working with submit event on jquery

I'm working in a project in MVC, but I've been having trouble with the jquery validation. I have this event handler for the submit on jquery because I plan to use ajax on it. $("#form-cart").on("submit",function(e){ // codes …
Rudy
  • 11
  • 2
-2
votes
1 answer

Client side validation for custom validation not working

I am trying to validate two dates on my form, the dates are populated via datetime picker. I wrote custom validator to validate these fields. but the client side validation is not working as expected. I noticed parseFloat($(params).val()) in client…
Vin05
  • 587
  • 4
  • 12
  • 30
-2
votes
1 answer

How to call a custom function on jquery validation error

how can i call a function if the validation of a form element fails. My goal is to show additional items on the page if an error occurs during the validation. I'm using unobtrusive form validation. It would be nice to define an additional data…
raisr
  • 13
  • 2
-3
votes
1 answer

How to add Client validation on view component property based on another value?

I am new to .net core development. I am building a form with one check box and one view component. I am using view component to have popup control in my form. That popup should have a value only when the checkbox is checked. I am unable to provide…
-3
votes
2 answers

Submit large amount of elements MVC

Edit: jqueryval is the culprit (unobtrusive huh?). Not sure why it's affecting anything, as we disabled it on the checkboxes in the settings. However, commenting the reference makes the loadtime unnoticable. I've tried several fixes with no…
1 2 3
82
83