DateConstraint
public struct DateConstraint : Constraint
A constraint to validate if a value is a valid date.
-
A default error message to show if no custom error message is provided.
Declaration
Swift
public static let message: String -
A custom
DateFormatter.Declaration
Swift
public let dateFormatter: DateFormatter -
A custom error message.
Declaration
Swift
public let message: String -
See
Constraint.Declaration
Swift
public let groups: Set<Group> -
A validator named
DateValidatorto validate a value.Declaration
Swift
public let validator: ConstraintValidator -
Initializes a new instance with a custom
DateFormatter, a custom error message and a set ofGroups to group by.Declaration
Parameters
dateFormatterA custom
DateFormatter. Defaults to the “iso8601”DateFormatter.messageA custom error message. Defaults to the default error message.
groupsA set of
Groups to group by. Defaults to an empty set.
View on GitHub
Install in Dash