Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: add field validation #479

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

wip: add field validation #479

wants to merge 12 commits into from

Conversation

chrisvxd
Copy link
Member

WIP implementation of field validation.

Usage

{
  type: "text",
  validate: (value) => {
    return { type: "error", message: "Something went wrong!" }
  }
}

This is non-trivial because it's not clear when to trigger a validation message.

Tasks

  • Figure out when the validation message should be shown, if at all
  • Abstract out validation from fields
  • Block publish if invalid data, and figure out how to show which data is invalid?

Closes #362

Copy link

vercel bot commented May 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
puck-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 7:49pm
puck-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2024 7:49pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant