Interface FieldConstraint.Builder

  • Method Details

    • field

      The path of the field that failed validation, with nested members joined by dots, such as versionPolicy.versionSelector.

      Parameters:
      field - The path of the field that failed validation, with nested members joined by dots, such as versionPolicy.versionSelector.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • value

      The value the constraint evaluated: the field's value, or its length when the constraint is len.

      Parameters:
      value - The value the constraint evaluated: the field's value, or its length when the constraint is len.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • constraint

      FieldConstraint.Builder constraint(String constraint)

      The reason why the field's value is invalid.

      Parameters:
      constraint - The reason why the field's value is invalid.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • constraintValuesFrom

      FieldConstraint.Builder constraintValuesFrom(Collection<String> constraintValuesFrom)

      Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set.

      Parameters:
      constraintValuesFrom - Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • constraintValuesFrom

      FieldConstraint.Builder constraintValuesFrom(String... constraintValuesFrom)

      Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set.

      Parameters:
      constraintValuesFrom - Where each of the constraint's values came from, when any was read from another field. Each entry is the path of that field, or a {label} such as {account.maxExtensionSize} for a value the caller doesn't set.
      Returns:
      Returns a reference to this object so that method calls can be chained together.