Skip to content

New Field Restriction: Enforce uniqueness of elements within array fields #458

Description

@joneubank

Summary

Add a new field-level restriction that enforces all elements within an array field are unique (no duplicates within a single record's array value).

This is a design change issue. Introducing a new restriction requires design decisions before implementation can begin.

Motivation

Currently there is no way to declare that array elements must be distinct. For example, a field with isArray: true can silently accept ["A", "A", "B"] with no validation error.

Scope

This issue covers the design and documentation of the new restriction, including:

  • How the restriction is declared in a field definition
  • How validation is performed when the restriction is present
  • How validation errors are reported

Related

Originally raised in #457.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions