BaryoDev / BaryoDev/barakoCMS

Content: fields required only when a condition on other fields holds

Open
#810 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 21m
Merged PRs (30d)
307

Description

Found by simulating a Claude Code build of Color Me Fun 2026 through the barako CLI (epic #801) on 14 September 2026; the event registration app for the Rotary Club of Koronadal is the acceptance test. Simulation page: https://claude.ai/code/artifact/05afda1a-6461-431d-aff0-50b30d3b0778

Guardian name and mobile are required only when age is under 18; shirt size only when the entry type is COMPETE. A field today is required or not.

## Change

A field can declare `requiredWhen`: a condition on other fields of the same entry (equals, in, less than, greater than). Validation on create and update applies it; the schema endpoint returns it so forms and barakoBrew show and hide the field.

## Done when

- A registration with age 16 and no guardian is refused naming the guardian fields; age 30 without them is accepted.
- A FUN entry without a shirt size is accepted and a COMPETE entry without one is refused.

Contributor guide

Open the contributing guide

Research direction

Start at the entry validation paths for create and update, then trace the schema endpoint that supplies field metadata to forms and barakoBrew. Implement conditional checks for equals, in, less than, and greater than using fields from the same entry. Done means the listed registration cases accept or reject the correct fields and rejection messages name the missing guardian or shirt-size fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.