mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
fix(registration): Make Username optional (#831)
* fix(User.js): update validation schema for username field, allow empty string as a valid value fix(validators.js): update validation schema for username field, allow empty string as a valid value fix(Registration.tsx, validators.js): update validation rules for name and username fields, change minimum length to 2 and maximum length to 80, assure they match and allow empty string as a valid value fix(Eng.tsx): update localization string for com_auth_username, indicate that it is optional * fix(User.js): update regex pattern for username validation to allow special characters @#$%&*() fix(validators.js): update regex pattern for username validation to allow special characters @#$%&*() * fix(Registration.spec.tsx): fix validation error message for username length requirement
This commit is contained in:
parent
d38e463d34
commit
37347d4683
5 changed files with 15 additions and 16 deletions
|
|
@ -114,7 +114,7 @@ test('shows validation error messages', async () => {
|
|||
const alerts = getAllByRole('alert');
|
||||
expect(alerts).toHaveLength(5);
|
||||
expect(alerts[0]).toHaveTextContent(/Name must be at least 3 characters/i);
|
||||
expect(alerts[1]).toHaveTextContent(/Username must be at least 3 characters/i);
|
||||
expect(alerts[1]).toHaveTextContent(/Username must be at least 2 characters/i);
|
||||
expect(alerts[2]).toHaveTextContent(/You must enter a valid email address/i);
|
||||
expect(alerts[3]).toHaveTextContent(/Password must be at least 8 characters/i);
|
||||
expect(alerts[4]).toHaveTextContent(/Passwords do not match/i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue