jQuery Text Change Event Real Time Validation

Real Time Validation

It's a common problem, you have a text form that you need to validate client side. It's easy enough to do this when the form is submitted but in some cases better to do as they type.

Imagine how annoying Twitter would be if you had to submit your tweet before it told you how many characters you had left. On the other hand this same immediate validation can be abused if overused. Don't insult the user by congratulating them for each and every text field they fill in.

Implementing this requires binding events to the keyup event, and a couple other events if you want to detect text changes on cut and paste. Even if you're a JavaScript god it's tedious to keeping writing this logic over and over again. Be smart and use the ZURB text change event plugin instead.
  • Detecting Text Changes
  • Twitter Style Validation
  • AJAX Save
  • Validate Text
Simple cross browser detection of text changes for input and textarea elements using a jQuery custom event plugin by ZURB.

Demo: Check the demo
URL: http://www.zurb.com/playground/jquery-text-change-custom-event
Download: Download last version
jQuery Text Change Event Real Time Validation jQuery Text Change Event Real Time Validation Reviewed by Bhaumik Patel on 8:47 PM Rating: 5