forked from: TextField_restrict_maxChars

