homepage Welcome to WebmasterWorld Guest from 184.72.184.104
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library : Charter : Moderators: whoisgregg

JavaScript and AJAX Forum

    
Jquery and error is not shown when I label input
toplisek




msg:4435864
 3:41 pm on Apr 1, 2012 (gmt 0)

I have validation like:

<script type="text/javascript">
jQuery(function() {
jQuery("#form").validate({
rules: {
input: "required",
},
messages: {
input: "It is required filed",
},
});
});

As I have used also label inside input field it is detected this label as text inside input. This should not be detected as this is not users text.

How to avoid this?

 

enigma1




msg:4436131
 10:36 am on Apr 2, 2012 (gmt 0)

Have you tried using the "depends" property inside the rules?

depends: function(element) {
// check here if the default input string is present
}

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved