        withBSBNumber: STPBSBNumberValidator.sanitizedNumericString(for: bsbNumber ?? ""),
        completeOnMaxLengthOnly: editing) == .complete
    }
  }

  func isInputValid(_ input: String, for field: STPAUBECSFormViewField, editing: Bool) -> Bool {
    switch field {
    case .name:
      return true
    case .email:
      return input.count == 0
        || (editing && STPEmailAddressValidator.stringIsValidPartialEmailAddress(input))
        || (!editing && STPEmailAddressValidator.stringIsValidEmailAddress(input))
    case .BSBNumber:
      let state = STPBSBNumberValidator.validationState(forText: input)