Skip to content

Feature: one_of_many Validation #89

@Joraeuw

Description

@Joraeuw

I really like this library and I would like to improve it.

I have the idea to add a one_of_many validation. As the name suggests it will check if only one of N fields is present.

Here's a simple example:

 defparams :login do
        optional(:email, :string)
        optional(:username, :string)
        required(:password, :string)

        one_of_many([:email, :username])
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions