m3e/validation_messages

Types

Represents either a static message string or a dynamic callback that receives a DOM element (or Lustre element context) and returns a string.

pub type ValidationMessage(element) {
  StaticMessage(String)
  DynamicMessage(fn(element) -> String)
}

Constructors

  • StaticMessage(String)
  • DynamicMessage(fn(element) -> String)

ValidationMessages represented as a dictionary mapping flags to messages.

pub type ValidationMessages(element) =
  dict.Dict(ValidityFlag, ValidationMessage(element))

Enumeration representing the standard keyof ValidityStateFlags.

pub type ValidityFlag {
  ValueMissing
  TypeMismatch
  PatternMismatch
  TooLong
  TooShort
  RangeUnderflow
  RangeOverflow
  StepMismatch
  BadInput
  CustomError
}

Constructors

  • ValueMissing
  • TypeMismatch
  • PatternMismatch
  • TooLong
  • TooShort
  • RangeUnderflow
  • RangeOverflow
  • StepMismatch
  • BadInput
  • CustomError
Search Document