Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do you use jquery.validate.unobtrusive.js?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01610683
Message ID:
01610836
Vues:
31
I find that my code works even without the jquery.validate.unobtrusive.js. The reason I was looking at it (or for it) is that my project validation suddenly stopped working. Later (after I posted this question) I found that the problem was in the following. I added a Javascript code that was designed to disable the Submit button on click. And this Javascript code broke the validation. Once I corrected the Javascript, all started working. So for now I decided not to include the jquery.validate.unobtrusive.js into my project.
Thank you for your input.


>Sure it works as it's designed, but it all feels a bit clumsy. If you're using the built in Validation, the unobtrusive validation will enable client side validation. The unobtrusive file contains the MVC wrappers for jQuery.validate() to work with model binding on the client.
>
>Not sure about the ValidationMode - I think the only thing I ever set when I use it is to enable unobtrusive validation - it's off by default and you need to add the scripts to make it work in the first place.
>
>+++ Rick ---
>
>>Hi,
>>
>>I have an ASP.NET web forms application (developed in VS 2012) where I set up (in Web.config) for the pages to use unobtrusive validation . This is done by the following setting in web.config:
>>
>>
>><add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms" />
>>
>>
>>Everything has been working well for many customers (at least no reports of problems) until a couple of days ago a customer tells me that the page validation (requiredfield) does not work. So since yesterday I have been Googling and reading tons of pages on the subject.
>>One thing I came across is jquery.validate.unobtrusive.js. Currently the page use the following js libraries:
>>
>>
>>     <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>  
>>        <script src="Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script>  
>>        <script src="Scripts/jquery.validate.min.js" type="text/javascript"></script>
>>
>>
>>But I read online that I could NuGet jquery.validate.unobtrusive.js and add it to the libraries as follows:
>>
>>
>>     <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>  
>>        <script src="Scripts/jquery-ui-1.8.20.js" type="text/javascript"></script>  
>>        <script src="Scripts/jquery.validate.min.js" type="text/javascript"></script>
>>        <script src="Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>
>>
>>
>>Anybody done this and have good results? TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform