fix(users): edit profile username not lowercase (#2279)
This commit is contained in:
1 parent
749b0c6ee9
commit
b7fd2470ee
3 files changed
+6
-7
No files matched your search
@@ -7,7 +7,8 @@ import type { TranslationObject } from "@homarr/translation";
|
||||
import { zodEnumFromArray } from "./enums";
|
||||
import { createCustomErrorParams } from "./form/i18n";
|
||||
|
||||
const usernameSchema = z.string().min(3).max(255);
|
||||
// We always want the lowercase version of the username to compare it in a case-insensitive way
|
||||
const usernameSchema = z.string().trim().toLowerCase().min(3).max(255);
|
||||
|
||||
const regexCheck = (regex: RegExp) => (value: string) => regex.test(value);
|
||||
export const passwordRequirements = [
|
||||
|
||||
Reference in new issue
Block a user