[PR #5936] fix(profile): add validation for display name input #5430

Open
opened 2026-03-17 02:52:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/5936
Author: @sahilkhan09k
Created: 3/4/2026
Status: 🔄 Open

Base: mainHead: fix-profile-name-validation


📝 Commits (5)

  • 95c0262 fix(profile): add validation for display name input
  • e54b8d4 fix(profile): add validation for display name input emojis not allowed (#5764)
  • d5d1c7c Profile(fix) : changes the emoji checking in name
  • 1c915e6 Profile(Fix) : Resolved the toast syntax error
  • ec1a9da fix(i18n): add missing profile name validation messages

📊 Changes

2 files changed (+16 additions, -2 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+4 -2)
📝 packages/hoppscotch-common/src/components/profile/index.vue (+12 -0)

📄 Description

Closes #5764

What's changed

  • Added validation for the profile display name input field.
  • Prevented users from entering excessively long or invalid profile names.
  • Ensured the UI remains stable when updating the profile name.
  • Added a simple check before saving the display name to avoid invalid input.

Notes to reviewers

  • This fix addresses the issue where users could enter extremely long strings in the profile name field.
  • The validation is applied on the client side before updating the profile name.
  • No other functionality was modified.

Summary by cubic

Added client-side validation for the profile display name to block invalid input, enforcing a 30‑char limit (maxlength + runtime check) and using Unicode emoji detection to prevent emojis. Added missing i18n error messages and fixed toast syntax so the correct localized errors show; addresses #5764.

Written for commit ec1a9da116. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/5936 **Author:** [@sahilkhan09k](https://github.com/sahilkhan09k) **Created:** 3/4/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-profile-name-validation` --- ### 📝 Commits (5) - [`95c0262`](https://github.com/hoppscotch/hoppscotch/commit/95c0262d148d75702a7405bc3b343a4a80ecbd6f) fix(profile): add validation for display name input - [`e54b8d4`](https://github.com/hoppscotch/hoppscotch/commit/e54b8d4e96e4b819448e76c612b50190bbf89584) fix(profile): add validation for display name input emojis not allowed (#5764) - [`d5d1c7c`](https://github.com/hoppscotch/hoppscotch/commit/d5d1c7c9027e79f38d3afda4eb2ba02dc255ee06) Profile(fix) : changes the emoji checking in name - [`1c915e6`](https://github.com/hoppscotch/hoppscotch/commit/1c915e601b17da2406b99fb8d8b681b1fdef68bd) Profile(Fix) : Resolved the toast syntax error - [`ec1a9da`](https://github.com/hoppscotch/hoppscotch/commit/ec1a9da116e57105af65d7519b752a70bce90f7a) fix(i18n): add missing profile name validation messages ### 📊 Changes **2 files changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+4 -2) 📝 `packages/hoppscotch-common/src/components/profile/index.vue` (+12 -0) </details> ### 📄 Description Closes #5764 ### What's changed - Added validation for the profile display name input field. - Prevented users from entering excessively long or invalid profile names. - Ensured the UI remains stable when updating the profile name. - Added a simple check before saving the display name to avoid invalid input. ### Notes to reviewers - This fix addresses the issue where users could enter extremely long strings in the profile name field. - The validation is applied on the client side before updating the profile name. - No other functionality was modified. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added client-side validation for the profile display name to block invalid input, enforcing a 30‑char limit (maxlength + runtime check) and using Unicode emoji detection to prevent emojis. Added missing i18n error messages and fixed toast syntax so the correct localized errors show; addresses #5764. <sup>Written for commit ec1a9da116e57105af65d7519b752a70bce90f7a. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#5430
No description provided.