Skip to content

Feature Request: Mutually Exclusive option #2379

Open
@GiuseppeIII

Description

@GiuseppeIII

Feature Request:
Seems there is has been some requests for this already:
#1802, #1855

So just creating a new issue to show interest!

The way I would see this working is something like either

  • .xor(group: string)
  • exclusiveGroup(group: string)
  • exactlyOne(group: string)

Additional functionality could include

  • groups being allowed to be an array (an option being allowed to belong to multiple exclusive groups)
  • ability to set allow exactly x per group instead of just exactly 1 (exclusiveGroup(group: string, number: number)
  • ability to set up bounds per group instead of just exactly x (exclusiveGroup(group: string, number: number, max: number) (first number is min)

Though I am not sure if the added functionality of these other options would be worth the complexity

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions