Skip to content

Remote form should respect HTML constraints #15270

@hyunbinseo

Description

@hyunbinseo

Describe the bug

When submitting this form:

<form {...validateCode}>
  <input
    {...validateCode.fields.code.as('text')}
    required
    minlength={6}
    maxlength={6}
  />
</form>
  1. required is respected - shows browser tooltip, and POST request is not made
  2. minlength and maxlength are not respected. Entering 1 still results in POST request

Reproduction

System Info

System:
  OS: Windows 11 10.0.26200
  CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
  Memory: 3.86 GB / 31.48 GB
Binaries:
  Node: 24.13.0 - C:\Users\hyunb\AppData\Local\fnm_multishells\30476_1770345708960\node.EXE
  Yarn: 1.22.22 - C:\Users\hyunb\AppData\Local\fnm_multishells\30476_1770345708960\yarn.CMD
  npm: 11.6.2 - C:\Users\hyunb\AppData\Local\fnm_multishells\30476_1770345708960\npm.CMD
  pnpm: 10.28.2 - C:\Users\hyunb\AppData\Local\fnm_multishells\30476_1770345708960\pnpm.CMD
  Deno: 2.4.0 - C:\Users\hyunb\.deno\bin\deno.EXE
Browsers:
  Chrome: 144.0.7559.110
  Edge: Chromium (140.0.3485.54)
  Firefox: 147.0.2 - C:\Program Files\Mozilla Firefox\firefox.exe
npmPackages:
  @sveltejs/adapter-node: ^5.5.2 => 5.5.2
  @sveltejs/kit: ^2.50.2 => 2.50.2
  @sveltejs/vite-plugin-svelte: ^6.2.4 => 6.2.4
  svelte: ^5.49.2 => 5.49.2
  vite: ^7.3.1 => 7.3.1

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    formsStuff relating to forms and form actions

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions