mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-23 03:44:04 +03:00
kns registration: disallow capital letters
This commit is contained in:
parent
a843278ee9
commit
ae92859c91
2
kinode/packages/app_store/ui/package-lock.json
generated
2
kinode/packages/app_store/ui/package-lock.json
generated
@ -3749,8 +3749,6 @@
|
||||
},
|
||||
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-wasm/-/napi-wasm-1.1.0.tgz",
|
||||
"integrity": "sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==",
|
||||
"inBundle": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
|
@ -47,6 +47,12 @@ function EnterKnsName({
|
||||
let validities: string[] = [];
|
||||
setIsPunyfied('');
|
||||
|
||||
if (/[A-Z]/.test(name)) {
|
||||
validities.push(NAME_URL);
|
||||
setNameValidities(validities);
|
||||
return;
|
||||
}
|
||||
|
||||
let normalized = ''
|
||||
index = validities.indexOf(NAME_INVALID_PUNY);
|
||||
try {
|
||||
@ -69,7 +75,9 @@ function EnterKnsName({
|
||||
index = validities.indexOf(NAME_URL);
|
||||
if (name !== "" && !isValidDomain(normalized)) {
|
||||
if (index === -1) validities.push(NAME_URL);
|
||||
} else if (index !== -1) validities.splice(index, 1);
|
||||
} else if (index !== -1) {
|
||||
validities.splice(index, 1);
|
||||
}
|
||||
|
||||
index = validities.indexOf(NAME_CLAIMED);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user