Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between jQuery Validation and Microsoft jQuery Unobtrusive

What's the difference between the nugget packages Jquery Validation and Microsoft Jquery Unobtrusive when using them for validation?

like image 664
john Avatar asked Apr 13 '26 20:04

john


1 Answers

jQuery Validation is just a javascript plugin used by Microsoft through its custom javascript named Microsoft jQuery Unobstrusive plugin to make ASP.Net MVC validation on client side a quiet simple.

jQuery Validation by definition (source https://jqueryvalidation.org/) :

This jQuery plugin makes simple clientside form validation easy, whilst still offering plenty of customization options. It makes a good choice if you’re building something new from scratch, but also when you’re trying to integrate something into an existing application with lots of existing markup. The plugin comes bundled with a useful set of validation methods, including URL and email validation, while providing an API to write your own methods.

Microsoft jQuery Unobstrusive need and works upon jQuery Validation. When you're using ASP.Net Validation like decorating your model with some data annotations attributes (Required, EmailAddress, etc), ASP.Net MVC generates some data-* attribute on fields that are related to your model. Microsoft jQuery Unobstrusive use those data-* and make your developer life easy so you don't need to code all thoses things describe in the jQuery Validation vidéo. That is why the Unobstrusive word is on Microsoft jQuery Unobstrusive. Go to this link to learn more about Unobstrusive Javascript

like image 113
CodeNotFound Avatar answered Apr 16 '26 09:04

CodeNotFound



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!