Skip to content

Commit

Permalink
Merge pull request #1881 from IntersectMBO/fix/1873-drep-registration…
Browse files Browse the repository at this point in the history
…-space-and-whitespace-in-given-names-supported

fix(#1873): fix missing DRep name whitespace validation
  • Loading branch information
MSzalowski authored Aug 30, 2024
2 parents f5f0035 + b587b36 commit 42631f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ changes.
- Fix counting votes by CC committee members and SPOs [Issue 1838](https://github.com/IntersectMBO/govtool/issues/1838)
- Fix displaying non relevant data in protocol parameter change Governance Action [Issue 1601](https://github.com/IntersectMBO/govtool/issues/1601)
- Fix voting on info actions in bootstrapping phase [Issue 1876](https://github.com/IntersectMBO/govtool/issues/1876)
- Fix missing DRep name whitespace validation [Issue 1873](https://github.com/IntersectMBO/govtool/issues/1873)

### Changed

Expand Down
4 changes: 4 additions & 0 deletions govtool/frontend/src/consts/dRepActions/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const Rules = {
maxLength: 80,
}),
},
pattern: {
value: /^[^\s]+$/,
message: i18n.t("registration.fields.validations.noSpaces"),
},
},
LINK: {
pattern: {
Expand Down
1 change: 1 addition & 0 deletions govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ export const en = {
maxLength: "Max {{maxLength}} characters",
required: "This field is required",
url: "Invalid URL",
noSpaces: "No spaces allowed",
},
},
},
Expand Down

0 comments on commit 42631f8

Please sign in to comment.