Skip to content

Schema: validation-rule editor + client-side row validation #19

Description

@Adron

Scope

Expose each field's validation object and pre-validate rows before they hit the API.

Rule Applies to Server error message
min number, date, datetime <label> must be at least <min> / ... must be after <min>
max number, date, datetime <label> must be at most <max> / ... must be before <max>
minLength text, textarea <label> must be at least <n> characters
maxLength text, textarea <label> must be at most <n> characters
pattern text, textarea, email <label> format is invalid
step number increment hint, UI only — not enforced server-side

Type-level checks always run regardless of validation: email must be a valid address, url a valid URL, boolean a real boolean, select/multiselect values must be within options (<label> must be one of: ...), and a required empty value yields <label> is required.

Rules are applied by the server on POST/PUT /api/lists/{id}/data — not when the schema is created.

Acceptance criteria

  • Editor exposes every applicable rule per field type (and hides the inapplicable ones).
  • Row entry validates client-side first, showing the message beside the offending field.
  • A server 400 still maps back to the right field rather than a generic toast.
  • step is applied to the number input only, and is not treated as a constraint.

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

    P1Table stakesarea:listsArea: listsparityWeb/API feature-parity work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions