Skip to content

Build a shadcn zod powered form that validates the data #2

@david11267

Description

@david11267

The data in the form should include:

  • Weight| Number (kg) | Min: 30, Max: 200
  • Age | Number (years) | Min: 10, Max: 100
  • Sex | Enum | "male", "female", "other" (optional)
  • GI Sensitivity | Boolean | Yes / No
  • Pace | Time (min/km) | Min: 2.5, Max: 20 (e.g., 5:30 min/km = 5.5)
  • Duration | Time (minutes) | Min: 10, Max: 600 (i.e., 10 hours)
  • Run Start Time | Time (HH:mm) | 24-hour format, valid range 00:00 to 23:59
  • Run Type | Enum | "easy", "tempo", "interval", "race", "long"

These will eventually be powered by map data but for now they should be included in form format

  • Weather Condition | Enum (optional) | "normal", "hot", "cold", "humid"
  • Terrain Type | Enum | "flat", "hilly", "trail"
  • Distance | Number (km) | Min: 0.5, Max: 100

onSubmit should have 4 options: FullData, Pre-Run Nutrition Advice, Mid-Run Fueling Plan, Hydration Plan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions