CodeOath
← All challenges

Live Character Counter + Validation

Medium
javascriptformsdom

Build a text input with a live character counter (e.g. "42/140") that updates as the user types, and turns red once they exceed a 140-character limit. Add a submit button that's disabled while over the limit.

Check your work against

  • The counter updates on every keystroke, not just on submit
  • The counter visually changes color (e.g. to red) once the limit is exceeded
  • The submit button is disabled while over the limit, and re-enabled once back under it
  • Works correctly if the user pastes text in, not just types it

There's no automated grading for UI challenges — self-check against this list, then compare with the solution preview.

Live preview