fix(users): edit profile username not lowercase (#2279)
This commit is contained in:
@@ -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