-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use MatcherNames const for setting up custom matchers
- Loading branch information
1 parent
fd9a877
commit 5e4d755
Showing
11 changed files
with
101 additions
and
73 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const MatcherNames = { | ||
lowercase: 'lowercase', | ||
uppercase: 'uppercase', | ||
number: 'number', | ||
specialChar: 'specialChar', | ||
minLength: 'minLength', | ||
maxLength: 'maxLength', | ||
}; |
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
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 |
---|---|---|
@@ -1,19 +1,22 @@ | ||
export const customMatchersTranslations = { | ||
// translations.ts | ||
import { MatcherNames } from './matcherNames'; | ||
|
||
export const MatchersTranslations = { | ||
warnings: { | ||
lowercaseRequired: 'At least one lowercase letter is required.', | ||
minLength: 'Password must be at least %s characters long.', | ||
maxLength: 'Password must be no more than %s characters long.', | ||
numberRequired: 'At least one number is required.', | ||
specialRequired: 'At least one special character is required.', | ||
uppercaseRequired: 'At least one uppercase letter is required.', | ||
[MatcherNames.lowercase]: 'At least one lowercase letter is required.', | ||
[MatcherNames.minLength]: 'Password must be at least %s characters long.', | ||
[MatcherNames.maxLength]: 'Password must be no more than %s characters long.', | ||
[MatcherNames.number]: 'At least one number is required.', | ||
[MatcherNames.specialChar]: 'At least one special character is required.', | ||
[MatcherNames.uppercase]: 'At least one uppercase letter is required.', | ||
}, | ||
suggestions: { | ||
lowercaseRequired: 'Include at least one lowercase letter.', | ||
minLength: 'Make your password at least %s characters long.', | ||
maxLength: 'Reduce your password to no more than %s characters.', | ||
numberRequired: 'Include at least one number.', | ||
specialRequired: 'Include at least one special character.', | ||
uppercaseRequired: 'Include at least one uppercase letter.', | ||
[MatcherNames.lowercase]: 'Include at least one lowercase letter.', | ||
[MatcherNames.minLength]: 'Make your password at least %s characters long.', | ||
[MatcherNames.maxLength]: 'Reduce your password to no more than %s characters.', | ||
[MatcherNames.number]: 'Include at least one number.', | ||
[MatcherNames.specialChar]: 'Include at least one special character.', | ||
[MatcherNames.uppercase]: 'Include at least one uppercase letter.', | ||
}, | ||
timeEstimation: {}, | ||
}; |
Oops, something went wrong.