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.

Added "role" to collection, added checks - now I get "The following field is invalid: role" in Admin

default discord avatar
sawariz0r2 years ago

I must have missed something. Shouldn't it update the existing users in the collection when adding a new field?


The field:


 {
      name: "role",
      type: "radio",
      defaultValue: () => ["user"],
      required: true,
      options: [
        {
          label: "User",
          value: "user",
        },
        {
          label: "Admin",
          value: "admin",
        },
      ],
    },


Any ideas?



EDIT:


Was first using a select instead of radio, so I missed changing the

["user"]

. Solved the issue 🙂

    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.