[DEV-3702] Enhance validation and error handling in SignUpForm and ProfileDataCard#2119
Merged
marcobottaro merged 25 commits intomainfrom Mar 20, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 861c876 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…rofile-fields-validators
…rofile-fields-validators
Contributor
There was a problem hiding this comment.
Pull request overview
Improves client-side validation and error display for sign-up and profile editing flows, with stricter name rules and max-length enforcement.
Changes:
- Added
validateNameand extendedvalidateFieldwith max-length checks. - Wired validation + inline error messaging into
SignUpForm,ProfileDataCard, and input components. - Added new localized error strings (EN/IT) and fixed
maxLengthprop casing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/nextjs-website/src/messages/it.json | Adds localized max-length and name-validation error messages (IT). |
| apps/nextjs-website/src/messages/en.json | Adds localized max-length and name-validation error messages (EN). |
| apps/nextjs-website/src/helpers/auth.helpers.ts | Adds validateName; updates validateField to enforce trimmed non-empty + max length. |
| apps/nextjs-website/src/components/organisms/Auth/SignUpForm.tsx | Applies new validators and displays field-level errors, including role. |
| apps/nextjs-website/src/components/molecules/RequiredTextField/RequiredTextField.tsx | Adds an external error prop support and helper text behavior changes. |
| apps/nextjs-website/src/components/molecules/ProfileDataCard/ProfileDataCard.tsx | Adds validation on save, tracks per-field errors, clears errors on cancel/edits. |
| apps/nextjs-website/src/components/atoms/InfoCardItem/ProfileDataCardItem.tsx | Passes error state into fields; fixes maxLength prop casing. |
| .changeset/eight-chicken-teach.md | Adds changeset entry describing the feature work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/nextjs-website/src/components/molecules/RequiredTextField/RequiredTextField.tsx
Outdated
Show resolved
Hide resolved
apps/nextjs-website/src/components/atoms/InfoCardItem/ProfileDataCardItem.tsx
Outdated
Show resolved
Hide resolved
apps/nextjs-website/src/components/molecules/RequiredTextField/RequiredTextField.tsx
Outdated
Show resolved
Hide resolved
apps/nextjs-website/src/components/organisms/Auth/SignUpForm.tsx
Outdated
Show resolved
Hide resolved
apps/nextjs-website/src/components/molecules/ProfileDataCard/ProfileDataCard.tsx
Outdated
Show resolved
Hide resolved
apps/nextjs-website/src/components/molecules/ProfileDataCard/ProfileDataCard.tsx
Outdated
Show resolved
Hide resolved
…/RequiredTextField.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ataCardItem.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/RequiredTextField.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
marcobottaro
approved these changes
Mar 18, 2026
marcobottaro
approved these changes
Mar 20, 2026
Contributor
Jira Pull Request LinkThis Pull Request refers to the following Jira issue DEV-3702 |
marcobottaro
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improved validation and error handling for profile and sign-up forms, focusing on name fields and maximum character limits. The main changes include new validation logic, error messaging, and UI updates to display validation errors to users.
List of Changes
Validation and error handling improvements:
validateNamefunction to enforce stricter rules for name fields, including allowed characters and a maximum length of 50 characters. Also updatedvalidateFieldto check for empty values and a maximum length of 100 characters.errorprop toProfileDataCardItemandRequiredTextFieldcomponents, allowing error messages to be shown directly under the relevant input fields.UI and code quality updates:
maxlengthtomaxLengthfor consistency with React standards.RequiredTextFieldto show helper text and error state only when appropriate.Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: