Skip to content

[Bug]: forms accepts any string for date and datetime-local fields #682

Closed

Description

@jimhoyd

Runtime revision and environment

main @ acb88ff, packages/forms.

Minimal reproduction

Declare a forms flow field with type: date (or datetime-local) and submit any string, e.g. not-a-date.

Expected: the submission is refused with a field error, like type: email and type: number are.
Actual: admission() in packages/forms/src/forms.ts validates email and number formats but has no branch for date / datetime-local, so any string (within length limits) is accepted and passed to onSubmit.

Relevant output

Found during triage by reading the code; not yet exercised by a test. Split out of #528, which covers the larger conditional/date-range feature.

Activity

  1. added
    bug
    extension
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugextension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions