jquery form validation

Posted by kalpaitch on Stack Overflow See other posts from Stack Overflow or by kalpaitch
Published on 2010-03-16T21:30:50Z Indexed on 2010/03/16 21:31 UTC
Read the original article Hit count: 276

Filed under:
|

I am using jquery for a quick and easy form validation My forms use the input's default value as a label and I have a little onfocus and onblur javascript function to show and hide this when the user starts to type:

<input name='fnameREG' type='text' id='fnameREG' value='first name' size='70' onfocus='clearInput(this)' onblur='clearInput(this)' />
<input name='lnameREG' type='text' id='lnameREG' value='last name' size='70' onfocus='clearInput(this)' onblur='clearInput(this)' />

My issue with the validation is that when the submit button is clicked the pluggin thinks that all the fields are set because they have a default value. I looked but I couldn't find a supplied method to get round this. Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about form-validation