Check type ID#

kind: object_string_length

Purpose#

Constrain the minimum and/or maximum length of a string field.

Configuration keys#

FieldRequiredDefaultMeaning
fieldyes-Frontmatter key to check.
min_lengthno-Minimum length. At least one of min_length/max_length is required.
max_lengthno-Maximum length. At least one of min_length/max_length is required.

Example#

collections:
  notes:
    path: notes
    checks:
      - kind: object_string_length
        field: title
        min_length: 3
        max_length: 120