Structures

The following structures are available globally.

  • A property wrapper that can validate the property it wraps.

    When the wrapped value changes @Validate will run the provided validations against the value.

    Once validated, the isValid and errors properties can provide validation results.

    The Validate framwork contains a number of built in validations such as presence, count and format. All which a various array of types.

    If the included validations don’t quite do what is required, new validations can be built with the Validation struct.

    See more

    Declaration

    Swift

    @propertyWrapper
    public struct Validate<Value> : DynamicProperty
  • A struct for encapsulating validations.

    See more

    Declaration

    Swift

    public struct Validation<Value>
  • Describes a validation error.

    See more

    Declaration

    Swift

    public struct ValidationError : LocalizedError