john
john

Reputation: 33

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?

Upvotes: 3

Views: 2624

Answers (1)

CodeNotFound
CodeNotFound

Reputation: 23190

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

Upvotes: 2

Related Questions