I'm following along in the book, and I got the last Try It Out exercise in Chapter 11: Enabling Unobtrusive JavaScript Validation. I followed all the steps, at least I think so, but when I do step 10, 'testing step', and I click send, no validation code is run and the website throws an error because the empty email field got passed to the code behind.
I ran the source code that I downloaded for the book and it seems to work correctly. So I copied and pasted, one by one, all of the code that I thought was relevant for the current exercise, and of course changed the jquery version from 1.7.2(source website) to 2.1.1(my website). After trying each file, I still couldn't get the form to validate.
I discovered that the only way I can re-enable validation was to change:
Code:
<add key="ValidationSettings:UnobtrusiveValidationMode" value="WebForms"/>
back to:
Code:
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
Did an update break this functionality, or is it just likely I missed something?
Of course any help is appreciated.
Since I'm using that workaround, i'll just continue to the next chapter, but I would like to know what I did wrong. If I need to, I can give hastebin links for my code to be examined.