Class: Constraints

Validation constraints attached to a field.

URI: fts:Constraints

 classDiagram
    class Constraints
    click Constraints href "../Constraints/"
      Constraints : enum
        
      Constraints : maximum
        
      Constraints : maxLength
        
      Constraints : minimum
        
      Constraints : minLength
        
      Constraints : pattern
        
      Constraints : required
        
      Constraints : unique
        
      

Slots

Name

Cardinality and Range

Description

Inheritance

required

0..1
Boolean

Whether the field must have a value in every row

direct

unique

0..1
Boolean

Whether each value of this field must be distinct across rows

direct

pattern

0..1
String

Regular expression that all values must match (XML Schema regex syntax)

direct

enum

*
String

Closed list of allowed values

direct

minLength

0..1
Integer

Minimum length for string values (or item count for arrays)

direct

maxLength

0..1
Integer

Maximum length for string values (or item count for arrays)

direct

minimum

0..1
String

Minimum permissible value for numeric, date, datetime, time, year, and yearmo…

direct

maximum

0..1
String

Maximum permissible value (matches minimum semantics)

direct

Usages

used by

used in

type

used

Field

constraints

range

Constraints

Identifier and Mapping Information

Schema Source

  • from schema: https://specs.frictionlessdata.io/table-schema

Mappings

Mapping Type

Mapped Value

self

fts:Constraints

native

fts:Constraints

LinkML Source

Direct

```yaml name: Constraints description: Validation constraints attached to a field. from_schema: https://specs.frictionlessdata.io/table-schema attributes: required: name: required description: Whether the field must have a value in every row. An empty string is considered missing per Frictionless conventions. from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: boolean unique: name: unique description: Whether each value of this field must be distinct across rows. from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: boolean pattern: name: pattern description: Regular expression that all values must match (XML Schema regex syntax). from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: string enum: name: enum description: Closed list of allowed values. Treated as an enumeration in target schemas that distinguish that case. from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: string multivalued: true minLength: name: minLength description: Minimum length for string values (or item count for arrays). from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: integer maxLength: name: maxLength description: Maximum length for string values (or item count for arrays). from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: integer minimum: name: minimum description: Minimum permissible value for numeric, date, datetime, time, year, and yearmonth types. The literal type matches the field's type. from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: string maximum: name: maximum description: Maximum permissible value (matches `minimum` semantics). from_schema: https://specs.frictionlessdata.io/table-schema rank: 1000 domain_of: - Constraints range: string
</details>

### Induced

<details>
```yaml
name: Constraints
description: Validation constraints attached to a field.
from_schema: https://specs.frictionlessdata.io/table-schema
attributes:
  required:
    name: required
    description: Whether the field must have a value in every row. An empty string
      is considered missing per Frictionless conventions.
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: required
    owner: Constraints
    domain_of:
    - Constraints
    range: boolean
  unique:
    name: unique
    description: Whether each value of this field must be distinct across rows.
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: unique
    owner: Constraints
    domain_of:
    - Constraints
    range: boolean
  pattern:
    name: pattern
    description: Regular expression that all values must match (XML Schema regex syntax).
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: pattern
    owner: Constraints
    domain_of:
    - Constraints
    range: string
  enum:
    name: enum
    description: Closed list of allowed values. Treated as an enumeration in target
      schemas that distinguish that case.
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: enum
    owner: Constraints
    domain_of:
    - Constraints
    range: string
    multivalued: true
  minLength:
    name: minLength
    description: Minimum length for string values (or item count for arrays).
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: minLength
    owner: Constraints
    domain_of:
    - Constraints
    range: integer
  maxLength:
    name: maxLength
    description: Maximum length for string values (or item count for arrays).
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: maxLength
    owner: Constraints
    domain_of:
    - Constraints
    range: integer
  minimum:
    name: minimum
    description: Minimum permissible value for numeric, date, datetime, time, year,
      and yearmonth types. The literal type matches the field's type.
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: minimum
    owner: Constraints
    domain_of:
    - Constraints
    range: string
  maximum:
    name: maximum
    description: Maximum permissible value (matches `minimum` semantics).
    from_schema: https://specs.frictionlessdata.io/table-schema
    rank: 1000
    alias: maximum
    owner: Constraints
    domain_of:
    - Constraints
    range: string