Skip to content

Form novalidate attribute doesn't render when conditional (given a value) #15082

@Rican7

Description

@Rican7

Describe the bug

Adding a novalidate attribute to a <form> element is not rendering that attribute, unless it's not conditional (no value is given).

For example, this works: <form novalidate></form>
... but this does not work: <form novalidate={true}></form>

Reproduction

Here's a minimal reproduction using the latest release of Svelte (v5.19.1):

https://svelte.dev/playground/585b8c82301d4c65bc83eeaeda119d68?version=5.19.1

Logs

System Info

System:
    OS: Linux 4.4 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 13.48 GB / 31.74 GB
    Container: Yes
    Shell: 5.1.16 - /usr/bin/bash
  npmPackages:
    svelte: ^5.19.0 => 5.19.0

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions