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.

Can you set an max on hasMany?

default discord avatar
chrinsieboy3 years ago
2

I tried to put an maximum on hasMany, but it did not work with maxRows or maxDepth.


Is there any way to fix it? or do i just set an description with only the first 3 will be seen

  • discord user avatar
    jarrod_not_jared
    3 years ago
    @352799514442072065

    Are you using Typescript? maxRows/minRows is not currently supported on relationship fields - but sounds like it might be useful as a feature. You should start up a github discussion related to this and we will see where we can slate it into our roadmap.



    As for wha you can do

    now

    , I think using a description paired with a

    validate

    function would get you pretty far. This way when the user submits, you can let them know before storing the data in the db.

  • default discord avatar
    chrinsieboy3 years ago

    👍 thx

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.