Skip to content

Ticket type price/quantity inputs accept non-numeric text, silently sent as null #15

Description

@presidojay1

The "Price" and "Quantity" inputs in the add-ticket-type form only set inputMode="numeric", which is just a mobile keyboard hint — it doesn't block typing letters. Number(ttQuantity) turns non-numeric input into NaN, and JSON.stringify(NaN) serializes to null, so an organizer typing anything non-numeric silently submits quantityTotal: null instead of getting a validation error.

Suggested fix: Add pattern="[0-9]+" (or switch to type="number" min="0") on both inputs, and guard the submit handler with a check that rejects non-finite numeric input before calling the API.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions