Skip to content

[Bug] AI model wizard step 1→2 bypasses all required field validation #408

Description

@saqibmanan

Summary

Clicking Next from the Metadata step (step 1) advances to the Version step (step 2) without validating any required field. All required fields — Sectors*, Tags*, Languages*, Geographies*, Intended Use*, Target Users*, Model Website*, Maximum Tokens* — can be left empty and the wizard proceeds silently.

Validation only triggers at the Publish step (step 3), where the Publish button is disabled and a summary of missing fields is listed.

Impact

  • Users can create a Version record and configure Access Methods on a model with zero metadata
  • Only discover the block at the very last step, after potentially configuring complex API access methods
  • Orphaned Version and Access Method records attached to an incomplete model draft

Steps to Reproduce

  1. Navigate to /dashboard/organization/{org}/aimodels → Add New AI Model
  2. On the Metadata tab, leave all required fields empty
  3. Click Next
  4. Wizard advances to the Version tab with no error shown

Expected Behaviour

Step 1 → 2 transition should validate all required metadata fields and surface inline errors before allowing navigation.

Fix Recommendation

Add per-step validation:

  • Step 1 → 2: all required Metadata fields must be non-empty
  • Step 2 → 3: at least one Access Method must be configured

Environment

  • URL: https://dev.civicdataspace.in/dashboard/organization/civicdatalab/aimodels/edit/168/details
  • Discovered: 2026-06-22 via QA audit
  • Report ref: VALID-001

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions