It seems that unique implies required.
Not true. I’ve had many occasions in other systems where I needed SQL indexes for “unique or null”
Agree, how to do it in payload?
Could you do it in a custom validate function?
Probably, but I think that would introduce a potential race condition. Created a discussion over here:
https://github.com/payloadcms/payload/discussions/2072Going to mark an answered as the discussion has moved to github here.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.