Hi Rick,

That was the first thing I tried, it didn't work. Then it seemed to say in the docs that the label element would be created for you, and placed after the input field, so I took out the label markup, and that also didn't work.

I know I've got the js file included correctly, and it's doing *something*, because when I set debug = true, the form doesn't submit.

-- Josh



----- Original Message ----- From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: <jquery-en@googlegroups.com>
Sent: Friday, September 28, 2007 12:55 PM
Subject: [jQuery] Re: Validation plugin noob



Hi, Josh...

In your HTML, did you specify a place for the error
message to appear?

This is from Jorn's example:

<label for="firstname">Firstname</label>
<input id="firstname" name="firstname" />

I handle my error messages a little different than the
example above, preferring my error messages above the input field.

If I'm not mistaken I believe you're going to need a <label... field
for the default messages to appear.

Hopefully someone will come along who can tell you for sure.

But check's Jorn's source on:

http://jquery.bassistance.de/validate/demo-test/

And it may give you some clues about how the HTML works.

Rick


-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh Nathanson
Sent: Friday, September 28, 2007 3:18 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Validation plugin noob


Hey all,

Using Jorn's Validation plugin, it's not displaying the error message.  I
must be missing something obvious.  I'm just trying a test - it seems like
when I submit, if the field is empty, it should display an error message
after the input field.  What am I doing wrong?

JS:
$("#editform").validate({
 rules: {
   FirstName : "required"
   },
 messages: {
   FirstName : "Please enter your first name."
   },
 debug: true
});

Markup:
<input type="Text" size="30" name="FirstName" id="FirstName" value=""
class="formfield" maxlength="50">

-- Josh




Reply via email to