Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help with Jquery.Validate

 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am not sure what I am doing wrong I am using the Jquery.Validate plugin and it has a remote field

so I did this


the required works fine. It's the remote. I am using asp.net mvc and the path is right it hits my method




it returns false according to firebug yet jquery.validate does not kick in. I am using Version 1.5.5 of jquery.validate and jquery 1.3.2

What did I miss?

P.S what is the default message for remote?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used the remote rule yet myself. Are you sure it's kicking off the check?
 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.


Sorry was in a rush totally forgot about them. Thanks for reminding me


Bear Bibeault wrote:I haven't used the remote rule yet myself. Are you sure it's kicking off the check?


Well I put a debug line in Visual studios on the "Test" Method. When I leave the the "UserName" box it goes to this "Test" method and walks through the debug line. So I am assuming the rule is getting set properly since that's the only piece of code that is referencing the that "Test" method. Firebug also shows in the console that it hits that method and returns "False"

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably not what you wanted to hear, but it's probably time to break open the plugin code and see what it's doing...
 
Michael Hubele
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Probably not what you wanted to hear, but it's probably time to break open the plugin code and see what it's doing...


Well I wont' have to do that at least. I set my method to return "false" instead of

return false;

and that did the trick. It seems that if you return false; it sends back "False" not "false" and jquery.validate only understand "false".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic