🌐 between x and y string repetition change
This commit is contained in:
@@ -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"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user