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
anderrors
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
See moreValidation
struct.Declaration
Swift
@propertyWrapper public struct Validate<Value> : DynamicProperty
-
A struct for encapsulating validations.
See moreDeclaration
Swift
public struct Validation<Value>
-
Describes a validation error.
See moreDeclaration
Swift
public struct ValidationError : LocalizedError