-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
deea49c
to
d3058de
Compare
- 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
d3058de
to
f0c6b0c
Compare
- updates validation rules as in Edit Profile - removes unreqd translations files from serverSideTranslations for page
There was a problem hiding this 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.
Plant-for-the-Planet-org/planet-donations#446 (comment) |
Resolved in 469c4a7 |
I'm still able to add the allowed special characters for the respective field at the start of input |
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
8b0b916
to
469c4a7
Compare
Missed it out in the Edit Profile form. Has now been resolved in both Signup/Edit Profile forms (in 469c4a7) |
There was a problem hiding this 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.
"websiteInvalid": "Please enter valid Website URL", | ||
"countryRequired": "Country is required", | ||
"companyRequired": "Company Name is required" |
There was a problem hiding this comment.
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)?
Resolves potential errors faced due to mismatch in server/client validation for the profile form fields
Changes:
serverSideTranslations
. This is done for all languages (except for new text which is in english only)a. babel/plugin-transform-unicode-regex - to allow unicode regexp patterns as used in server validation