mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
Fix: Increase password max length and accept '-' for username in regex (#564)
* fix: increase username max length and accept '-' in regex * fix: increase username max length and accept '-' in regex * fix: increase username max length and accept '-' in regex
This commit is contained in:
parent
df2a68e1e7
commit
d2ce2ef2cd
6 changed files with 19 additions and 19 deletions
|
|
@ -187,8 +187,8 @@ function Registration() {
|
|||
message: 'Password must be at least 8 characters'
|
||||
},
|
||||
maxLength: {
|
||||
value: 40,
|
||||
message: 'Password must be less than 40 characters'
|
||||
value: 128,
|
||||
message: 'Password must be 128 characters or less'
|
||||
}
|
||||
})}
|
||||
aria-invalid={!!errors.password}
|
||||
|
|
@ -217,11 +217,11 @@ function Registration() {
|
|||
id="confirm_password"
|
||||
data-testid="confirm_password"
|
||||
aria-label="Confirm password"
|
||||
// uncomment to prevent pasting in confirm field
|
||||
onPaste={(e) => {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}}
|
||||
// uncomment to block pasting in confirm field
|
||||
// onPaste={(e) => {
|
||||
// e.preventDefault();
|
||||
// return false;
|
||||
// }}
|
||||
{...register('confirm_password', {
|
||||
validate: (value) => value === password || 'Passwords do not match'
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue