generated from goitacademy/react-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from 001elijah/auth
Fix password
- Loading branch information
Showing
10 changed files
with
116 additions
and
58 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
.error { | ||
position: absolute; | ||
color: $red-error-color; | ||
font-size: 12px; | ||
font-size: 10px; | ||
} | ||
|
||
.eye { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ export const validationSchemaLogin = yup.object().shape({ | |
.string() | ||
.matches(/^\S*$/, 'Must not contain spaces') | ||
.matches( | ||
/^[a-zA-Z0-9]+$/, | ||
'Can only contain Latin letters, numbers and signs', | ||
/^[a-zA-Z0-9!"@#$%^&*()]+$/, | ||
'Can only contain Latin letters, numbers, and signs', | ||
) | ||
.min(8, 'Minimum length 8 characters') | ||
.max(64, 'Maximum length 64 characters') | ||
|
@@ -41,10 +41,40 @@ export const validationSchemaRegister = yup.object().shape({ | |
.string() | ||
.matches(/^\S*$/, 'Must not contain spaces') | ||
.matches( | ||
/^[a-zA-Z0-9]+$/, | ||
'Can only contain Latin letters, numbers and signs', | ||
/^[a-zA-Z0-9!"@#$%^&*()]+$/, | ||
'Can only contain Latin letters, numbers, and signs', | ||
) | ||
.min(8, 'Minimum length 8 characters') | ||
.max(64, 'Maximum length 64 characters') | ||
.required('Password required'), | ||
}); | ||
|
||
export const validationSchemaEditProfile = yup.object().shape({ | ||
userName: yup | ||
.string() | ||
.matches( | ||
/^[a-zA-Z0-9_]+( [a-zA-Z0-9_]+)?$/, | ||
'Only letters, numbers, underscores, and spaces are allowed', | ||
) | ||
.min(2, 'Minimum length 2 characters') | ||
.max(32, 'Maximum length 32 characters') | ||
.required('Name required'), | ||
email: yup | ||
.string() | ||
.matches( | ||
/^[\w.%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, | ||
'Invalid email address. Example: [email protected]', | ||
) | ||
.required('Email required'), | ||
password: yup | ||
.string() | ||
.matches(/^\S*$/, 'Must not contain spaces') | ||
.matches( | ||
/^[a-zA-Z0-9!"@#$%^&*()]+$/, | ||
'Can only contain Latin letters, numbers, and signs', | ||
) | ||
.min(8, 'Minimum length 8 characters') | ||
.max(64, 'Maximum length 64 characters') | ||
.required('Password required'), | ||
avatarUrl: yup.string(), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters