jQuery-Form-Validator icon indicating copy to clipboard operation
jQuery-Form-Validator copied to clipboard

Word Count Validation

Open btafoya opened this issue 6 years ago • 1 comments

Any suggestions on using this library for word count validation? Thanks in advance!

btafoya avatar May 29 '18 17:05 btafoya

What have you tried?

This gets you some way there.

var total = value.split(' ').filter(function(v){return v!==''}).length;

if(total < 251) {
	return true;
} else {
	return false;
}

chrisjohnstone avatar May 30 '18 13:05 chrisjohnstone