FeaturevisorSchemas.Constraints (featurevisor_schemas v2.1.0)

Copy Markdown View Source

The HTML validation attributes a field's rules imply, nil where the rules set none.

Summary

Functions

The constraints as HTML attributes, only those set, such as required and maxlength.

Types

t()

@type t() :: %FeaturevisorSchemas.Constraints{
  max: number() | nil,
  max_length: non_neg_integer() | nil,
  min: number() | nil,
  min_length: non_neg_integer() | nil,
  multiple: boolean(),
  required: boolean(),
  step: pos_integer() | nil
}

Functions

attributes(constraints)

@spec attributes(t()) :: map()

The constraints as HTML attributes, only those set, such as required and maxlength.