mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 07:37:55 -05:00
Improve error message, particularly on the user card edit page
This commit is contained in:
@@ -241,7 +241,7 @@ export function numberField(
|
||||
) {
|
||||
return z.coerce
|
||||
.number()
|
||||
.int()
|
||||
.int({ message: "forms:errors.mustBeWholeNumber" })
|
||||
.nonnegative()
|
||||
.register(formRegistry, {
|
||||
...args,
|
||||
@@ -270,7 +270,7 @@ export function numberFieldOptional(
|
||||
) {
|
||||
return z.coerce
|
||||
.number()
|
||||
.int()
|
||||
.int({ message: "forms:errors.mustBeWholeNumber" })
|
||||
.nonnegative()
|
||||
.optional()
|
||||
.register(formRegistry, {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "This field is required",
|
||||
"errors.minLength": "Must be at least {{min}} characters",
|
||||
"errors.maxLength": "Must be at most {{max}} characters",
|
||||
"errors.mustBeWholeNumber": "Must be a whole number (no decimals)",
|
||||
"errors.invalidUrl": "Must be a valid URL",
|
||||
"errors.notAllowedCharacters": "Contains not allowed characters",
|
||||
"errors.atLeastOneOption": "At least one option must be selected",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "Este campo es obligatorio",
|
||||
"errors.minLength": "Debe tener al menos {{min}} caracteres",
|
||||
"errors.maxLength": "Debe tener como máximo {{max}} caracteres",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "Debe ser una URL válida",
|
||||
"errors.notAllowedCharacters": "Contiene caracteres no permitidos",
|
||||
"errors.atLeastOneOption": "Debe seleccionarse al menos una opción",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "",
|
||||
"errors.minLength": "",
|
||||
"errors.maxLength": "",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "",
|
||||
"errors.notAllowedCharacters": "",
|
||||
"errors.atLeastOneOption": "",
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"errors.required": "此项为必填项",
|
||||
"errors.minLength": "字数不能少于 {{min}} 个字符",
|
||||
"errors.maxLength": "字数不能多于 {{max}} 个字符",
|
||||
"errors.mustBeWholeNumber": "",
|
||||
"errors.invalidUrl": "请输入有效的 URL 地址",
|
||||
"errors.notAllowedCharacters": "包含非法字符",
|
||||
"errors.atLeastOneOption": "请至少选择一个选项",
|
||||
|
||||
Reference in New Issue
Block a user