Skip to content

Space management

OlenaOsadchaBA edited this page Jun 5, 2026 · 3 revisions
  1. The system shouldn't treat spaces entered before text input fields as valid characters (always)
  2. The system should trim (automatically remove) spaces at the start and the end of a value (on blur)
  3. The system shall normalize spaces by trimming starts and ends and converting consecutive spaces into a single space when saving data
  4. The system should normalize spaces by converting consecutive spaces into a single space in real time during input (always)
  5. Fields containing only spaces should be treated as empty
  6. The system should not count consecutive spaces as valid characters in the counter (always). Consecutive spaces count as 1 character in the counter.

Character Counter Behavior

The counter shows the length of the normalized value, not the raw string.

User types:     "  Hello   world  "   → raw length 18
Counter shows:  11 / 50               → normalized "Hello world"
After blur:     field displays "Hello world"
What user types Counter shows After blur
" Hello" 5 (not 7) "Hello"
"Hello " 5 (not 7) "Hello"
"Hello world" 11 (not 12) "Hello world"
" " 0 "" → field treated as empty

Clone this wiki locally