Structures
The following structures are available globally.
-
A property wrapper that can validate the property it wraps.
When the wrapped value changes
@Validatewill run the provided validations against the value.Once validated, the
isValidanderrorsproperties can provide validation results.The
Validateframwork 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 moreValidationstruct.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
Structures Reference