Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates profile validation #1920

Merged
merged 6 commits into from
Nov 27, 2023
Merged

Conversation

mohitb35
Copy link
Collaborator

@mohitb35 mohitb35 commented Nov 10, 2023

Resolves potential errors faced due to mismatch in server/client validation for the profile form fields

Changes:

  1. Updates validation rules in complete signup/edit profile form fields
  2. Reorganizes translations, grouping text for field labels and validation errors together, and removing unreqd translation files from serverSideTranslations. This is done for all languages (except for new text which is in english only)
  3. Adds dependencies
    a. babel/plugin-transform-unicode-regex - to allow unicode regexp patterns as used in server validation

Copy link

vercel bot commented Nov 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
planet-webapp ✅ Ready (Inspect) Visit Preview Nov 24, 2023 2:22pm

@mohitb35 mohitb35 force-pushed the feature/update-profile-validation branch from deea49c to d3058de Compare November 10, 2023 09:53
- matches server logic for firstname, lastname, name, address, city
- adds translations to editProfile.json
- groups translation text for field labels & validation errors together
- removes unreqd translation files from serverSideTranslations for page
- updates validation rules as in Edit Profile
- removes unreqd translations files from serverSideTranslations for page
Copy link
Contributor

@mariahosfeld mariahosfeld left a comment

Choose a reason for hiding this comment

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

Reviewed functionality within edit profile, worked as expected there.

@prachigarg19
Copy link
Collaborator

Plant-for-the-Planet-org/planet-donations#446 (comment)
This applies here as well. Apart from this, everything seems fine to me.

@mohitb35
Copy link
Collaborator Author

mohitb35 commented Nov 20, 2023

Plant-for-the-Planet-org/planet-donations#446 (comment) This applies here as well. Apart from this, everything seems fine to me.

Resolved in 8b0b916

Resolved in 469c4a7

@prachigarg19
Copy link
Collaborator

Plant-for-the-Planet-org/planet-donations#446 (comment) This applies here as well. Apart from this, everything seems fine to me.

Resolved in 8b0b916

I'm still able to add the allowed special characters for the respective field at the start of input
image

@mariahosfeld
Copy link
Contributor

Plant-for-the-Planet-org/planet-donations#446 (comment) This applies here as well. Apart from this, everything seems fine to me.

Resolved in 8b0b916

I'm still able to add the allowed special characters for the respective field at the start of input image

In general these are the special characters that are allowed for usage. But I agree, we should make sure that while they can be used within the fields, the first character in the field cannot be a special character.

- disallows entries beginning with special characters
@mohitb35
Copy link
Collaborator Author

Plant-for-the-Planet-org/planet-donations#446 (comment) This applies here as well. Apart from this, everything seems fine to me.

Resolved in 8b0b916

I'm still able to add the allowed special characters for the respective field at the start of input image

Missed it out in the Edit Profile form. Has now been resolved in both Signup/Edit Profile forms (in 469c4a7)

Copy link
Contributor

@mariahosfeld mariahosfeld left a comment

Choose a reason for hiding this comment

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

Functionality looks good to me.

@mariahosfeld mariahosfeld merged commit 99ffb83 into develop Nov 27, 2023
4 checks passed
@mariahosfeld mariahosfeld deleted the feature/update-profile-validation branch November 27, 2023 07:23
"websiteInvalid": "Please enter valid Website URL",
"countryRequired": "Country is required",
"companyRequired": "Company Name is required"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This resource does not seem to be used (I assume nameRequired is used instead)?

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.

4 participants