Make character and word limits clear where necessary. If users are likely to reach the limit, display the limit and count down as they approach it.
Fields with a known size
If the data you’re collecting has a known size or upper limit, set an appropriate character count for for the data(and any spaces or other punctuation you expect users may use).
Examples:
a passport number can only be 9 digits, so setting a max-length of 9 is appropriate.
a credit card number is 16 digits, so set a max-length of 19 to allow for those digits and three spaces.
Large free-text text boxes
Try to make character or word limits large enough that most users do not reach them. If it’s relevant for users to know the limit in advance, make it clear on the page. If users are highly unlikely to reach the limit, it may not be necessary to show it until they come close to reaching it.
It’s generally best to allow users to type more than the limit, but warn them when they’ve gone over. This supports users who paste text from other applications and then edit down to the required size.
Note: GDS is currently building a character and word count component.
Fields with a known size
Large free-text text boxes
Examples