AndConstraint

public struct AndConstraint : Constraint

A constraint to check if all of the child constraints are valid or not.

  • An array of child constraints.

    Declaration

    Swift

    public let constraints: [Constraint]
  • See Constraint.

    Declaration

    Swift

    public let groups: Set<Group>
  • A validator named AndValidator to validate a value.

    Declaration

    Swift

    public let validator: ConstraintValidator
  • Initializes a new instance with an array of child constraints and validation groups to be applied.

    Declaration

    Swift

    public init(_ constraints: [Constraint] = .init(), groups: Set<Group> = .init())

    Parameters

    constraints

    An array of child constraints.

    groups

    Validation groups to be applied. Defaults to an empty array.