🌐 between x and y string repetition change

This commit is contained in:
Tagaishi
2023-08-22 23:31:56 +02:00
parent b6f9467fc1
commit 558c731c6b
2 changed files with 4 additions and 6 deletions

View File

@@ -29,9 +29,7 @@
}, },
"item": { "item": {
"validation": { "validation": {
"length100": "Length must be between 1 and 100", "length": "Length must be between {{shortest}} and {{longest}}",
"length200": "Length must be between 1 and 200",
"length400": "Length must be between 1 and 400",
"invalidLink": "Not a valid link", "invalidLink": "Not a valid link",
"errorMsg": "Did not save, because there were validation errors. Please adust your inputs" "errorMsg": "Did not save, because there were validation errors. Please adust your inputs"
}, },

View File

@@ -84,11 +84,11 @@ const definition = defineWidget({
return undefined; return undefined;
} }
return t('item.validation.length100'); return t('item.validation.length', {shortest: "1", longest: "100"});
}, },
href: (value) => { href: (value) => {
if (!z.string().min(1).max(200).safeParse(value).success) { if (!z.string().min(1).max(200).safeParse(value).success) {
return t('item.validation.length200'); return t('item.validation.length', {shortest: "1", longest: "200"});
} }
if (!z.string().url().safeParse(value).success) { if (!z.string().url().safeParse(value).success) {
@@ -102,7 +102,7 @@ const definition = defineWidget({
return undefined; return undefined;
} }
return t('item.validation.length400'); return t('item.validation.length', {shortest: "1", longest: "400"});
}, },
}, },
validateInputOnChange: true, validateInputOnChange: true,