I have users typing in incredibly long strings, as below, is there a way in jquery to detect that a string is getting too long so that I can warn the user?
<textarea>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</textarea>
I’m thinking a keyup that checks the length since the last space (or since the beginning if no spaces)
Try this:
It checks the string length of word since last space.
DEMO