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.

invalid email

default discord avatar
vingonte2 years ago
3

not sure what is the problem here. I can add the first one, but this error show up trying to create another

  • default discord avatar
    britik.2 years ago

    it can happens to me sometimes, i just had to refresh the tab

  • default discord avatar
    .bakry2 years ago

    same

  • discord user avatar
    jarrod_not_jared
    2 years ago
    @845702067292078130

    You likely created the collection with

    auth: true

    and then later changed it to false.



    TLDR; delete the email index from your collection in mongodb.



    The reason this happens is bc

    auth: true

    adds the field

    email

    behind the scenes, this field is created with a unique index. Payload will not remove old indexes, you will have to do that manually.



    The reason you can create 1 user, is because they have no email, then the second user creation is attempted with the same blank email, not unique and it fails. Delete the index on the email field in mongodb and it should resolve your issues.

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.