Return a list of errors in the beforeValidate hook

default discord avatar
rxbbxss
8 months 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
    martin.rahbek
    8 months ago

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

  • default discord avatar
    dianoga
    last month

    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.cs
    last month

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

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.