feat: add maxLength constraints to auth and settings form inputs

Gives users immediate client-side feedback and prevents pathologically
long values from being typed. Caps match Zod schema limits where they
exist; email uses the RFC 5321 maximum.

Files touched (5):
- (home)/login/LocalLoginForm.tsx — email → 254
- (home)/register/page.tsx — email → 254
- dashboard/.../user-settings/.../ProfileContent.tsx — display name → 100
- components/settings/general-settings-manager.tsx — search space name → 100
- components/settings/roles-manager.tsx — role name (create+edit dialogs) → 100,
  role description (create+edit dialogs) → 500

Closes #948
This commit is contained in:
xianren 2026-04-16 22:33:01 +08:00
parent 4e68565a72
commit b8e663e8f4
5 changed files with 8 additions and 0 deletions

View file

@ -148,6 +148,7 @@ export function GeneralSettingsManager({ searchSpaceId }: GeneralSettingsManager
<Label htmlFor="search-space-name">{t("general_name_label")}</Label>
<Input
id="search-space-name"
maxLength={100}
placeholder={t("general_name_placeholder")}
value={name}
onChange={(e) => setName(e.target.value)}