Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Form validation: keyup or blur

I'm creating a sign-up form and I've noticed some disadvantages to validating (in jQ) using both keyup and blur. For example, in the "Re-enter password" field, validating on keyup will cause the warning ("Passwords do not match") to appear when the user first tabs into the field, but validating on blur has the disadvantage that the warning might still show even if the passwords DO match (but the user hasn't moved on).

Any standard work-around, or tricks that I'm missing?

2 Answers

Why not use this https://github.com/jzaefferer/jquery-validation great plugin? It's really simple to use and has loads of functionality :')

Thanks, I'll check that out.