Welcome to WebmasterWorld Guest from

Forum Moderators: open

Jquery and error is not shown when I label input

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

WebmasterWorld Senior Member 5+ Year Member

I have validation like:

<script type="text/javascript">
jQuery(function() {
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?
10:36 am on Apr 2, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

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

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

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved