Skip to content

Commit

Permalink
feat: Improve guardian name validation check
Browse files Browse the repository at this point in the history
  • Loading branch information
kleyberthsantos authored and Kodylow committed Sep 6, 2024
1 parent f9ed146 commit e6da08e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const BasicSettingsForm: React.FC<BasicSettingsFormProps> = ({

const validateName = useCallback(
(name: string) => {
const isValid = name.trim() !== '' && /^[a-zA-Z0-9]/.test(name);
const isValid = name.trim() !== 'set-config.validation-guardian-name';
isNextDisabled(!isValid);
},
[isNextDisabled]
Expand Down
1 change: 1 addition & 0 deletions apps/guardian-ui/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@
"bft-explanation": "A {{total}} Guardian Federation creates a {{honest}}/{{total}} Threshold.",
"bft-faulty": "Your Federation will be able to tolerate {{faulty}} faulty, offline, or malicious Guardians without impacting the Federation's operations.",
"guardian-name": "Guardian name",
"validation-guardian-name": "'' && /^[a-zA-Z0-9]/",
"guardian-name-help": "This random name will be shown to other Guardians during setup",
"acknowledge-backed-up": "I, {{guardianName}} (your guardian name), promise that I have backed up and secured my password:",
"admin-password": "Admin password",
Expand Down

0 comments on commit e6da08e

Please sign in to comment.