Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Return a list of errors in the beforeValidate hook

default discord avatar
rxbbxss2 years ago
3

Is it possible to return a list of errors in the beforeValidate hook, instead of setting data to null to mark it as invalid?

  • default discord avatar
    Deleted User2 years ago

    I think you can throw an error, and its returned to the admin and api

  • default discord avatar
    dianogalast year

    It looks like it does throw an error but it doesn't seem to mark the field that generated the error

  • default discord avatar
    alnasser.cslast year

    I noticed this. It will be nice if there’s a way to have this

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.