Thinkmill / Thinkmill/keystatic

allow validating that mdx field is not empty

Open
#1,230 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.4k
Forks
159
Avg merge
21h 41m
Merged PRs (30d)
2

Description

it would be cool to be able to validate that a richtext field (mdx or markdoc) must not be empty, e.g.:

fields.mdx({ label: "Summary", validation: { isRequired: true } })

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the fields.mdx API shown in the issue and trace how its validation options are handled, then compare the corresponding fields.markdoc path. Done means an isRequired option is accepted for rich-text fields and empty MDX or Markdoc content fails validation, with behavior covered by the relevant validation tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
content
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.