---
search:
boost: 10.0
---
# Class: Constraints
_Validation constraints attached to a field._
URI: [fts:Constraints](https://specs.frictionlessdata.io/table-schema/Constraints)
```mermaid
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](required.md) | 0..1
[Boolean](Boolean.md) | Whether the field must have a value in every row | direct |
| [unique](unique.md) | 0..1
[Boolean](Boolean.md) | Whether each value of this field must be distinct across rows | direct |
| [pattern](pattern.md) | 0..1
[String](String.md) | Regular expression that all values must match (XML Schema regex syntax) | direct |
| [enum](enum.md) | *
[String](String.md) | Closed list of allowed values | direct |
| [minLength](minLength.md) | 0..1
[Integer](Integer.md) | Minimum length for string values (or item count for arrays) | direct |
| [maxLength](maxLength.md) | 0..1
[Integer](Integer.md) | Maximum length for string values (or item count for arrays) | direct |
| [minimum](minimum.md) | 0..1
[String](String.md) | Minimum permissible value for numeric, date, datetime, time, year, and yearmo... | direct |
| [maximum](maximum.md) | 0..1
[String](String.md) | Maximum permissible value (matches `minimum` semantics) | direct |
## Usages
| used by | used in | type | used |
| --- | --- | --- | --- |
| [Field](Field.md) | [constraints](constraints.md) | range | [Constraints](Constraints.md) |
## 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
```
### Induced
```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
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
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
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
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
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
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
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
owner: Constraints
domain_of:
- Constraints
range: string
```