fix: add utf8 email validation support (#6239)
Co-authored-by: Thomas <thomas@ajnart.fr>
This commit is contained in:
1 parent
7c152cf4fe
commit
7d93df04dd
6 files changed
+43
-13
No files matched your search
+2
-1
@@ -17,6 +17,7 @@ import { showErrorNotification } from "@homarr/notifications";
|
||||
import { useI18n, useScopedI18n } from "@homarr/translation/client";
|
||||
import { UserAvatar } from "@homarr/ui";
|
||||
import { createCustomErrorParams } from "@homarr/validation/form/i18n";
|
||||
import { optionalEmailSchema } from "@homarr/validation/email";
|
||||
import { userPasswordSchema } from "@homarr/validation/user";
|
||||
|
||||
import { GroupSelectModal } from "~/components/access/group-select-modal";
|
||||
@@ -60,7 +61,7 @@ export const UserCreateStepperComponent = ({ initialGroups }: UserCreateStepperC
|
||||
const generalForm = useZodForm(
|
||||
z.object({
|
||||
username: z.string().min(1),
|
||||
email: z.string().email().or(z.string().length(0).optional()),
|
||||
email: optionalEmailSchema,
|
||||
}),
|
||||
{
|
||||
initialValues: {
|
||||
|
||||
Reference in new issue
Block a user