Skip to content

Should allow for multiple validators on a single field #22

@toddjordan

Description

@toddjordan

This is not a current capability of alpaca, but since we are making validators reusable with ember-cli-dynamic-forms, we want to support it.

With this feature, the validator field has the option to be specified as an array, for example:

{
  "schema": {
      ...
      "beverage": {
        "type": "string",
        "enum": ["water", "soda", "beer", "wine"]
      }
    }
  },
  "options": {
      ...
      "beverage": {
        "label": "Choice of Beverage",
        "slider": true,
        "validator": ["drinking-age", "non-negative"]
      }
    }
  }
}

Both validations should be executed, one or both messages if any validations are not met

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions