-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Show username validation error messages #6399
base: master
Are you sure you want to change the base?
Conversation
Any errors returned by the API when submitting edits to a user caused the loading spinner to stay on screen. This hides the spinner and makes the error message visible to the user
Show a descriptive message when the username input doesn't match a modified version of the regex used by the backend
Cloudflare Pages deployment
|
@@ -318,6 +327,7 @@ const UserEdit = () => { | |||
type='text' | |||
id='txtUserName' | |||
label='LabelName' | |||
validator={{ pattern: '^([\\w \\-\'._@+]*)([\\w\\-\'._@+])([\\w \\-\'._@+]*)$', errMessage: 'Username must not be empty and contain only numbers, letters, spaces, or the following symbols -\'._@+' }} |
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.
The text of the error message should be moved to en-us.json
and globalize.translate
should be used.
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.
Is that the way to add new phrases for globalization? Is there anything else I need to do for Weblate?
Quality Gate passedIssues Measures |
Changes
Issues
Closes #6384