Skip to content

feat: enforce character limit and add counter to contact form - #1936

Merged
komalharshita merged 2 commits into
komalharshita:mainfrom
SadmaFaahiim:feat/contact-form-char-limit
Oct 8, 2026
Merged

komalharshita merged 2 commits into
komalharshita:mainfrom
SadmaFaahiim:feat/contact-form-char-limit

Conversation

@SadmaFaahiim

Copy link
Copy Markdown

Description

The contact form previously allowed unlimited text input, which could fail backend constraints or clutter the database. This adds client-side character limits and a live remaining-character counter.

Changes

  • \src/templates/contact.html:
    • Added \maxlength\ to name (100), email (254), and message (1000) fields.
    • Added a remaining-character counter under the message textarea.
    • Counter turns yellow when under 20% of the limit remains and red at the limit.
    • Added .char-counter\ styles for normal / warn / danger states.

Acceptance Criteria

  • Textarea input has a character limit enforced
  • Character counter changes styling as the user approaches the limit

Closes #1379

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@SadmaFaahiim is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@komalharshita

Copy link
Copy Markdown
Owner

@SadmaFaahiim kindly resolve the merge conflicts

…har-limit

# Conflicts:
#	src/templates/contact.html
@SadmaFaahiim

Copy link
Copy Markdown
Author

Hi @komalharshita, merge conflicts resolved and the branch is up to date with main. I re-applied the feature onto the redesigned contact form on main: character limits (name 100 / email 254 / message 1000) plus a live character counter. Ready for review!

@komalharshita komalharshita left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for merge

@komalharshita
komalharshita merged commit 51d531c into komalharshita:main Oct 8, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui: enforce maximum character limit validations in frontend contact form inputs

3 participants