2025-10-12 13:25:25 +00:00
|
|
|
// ===----------------------------------------------------------------------===
|
|
|
|
|
//
|
|
|
|
|
// This source file is part of the DiscogsService open source project
|
|
|
|
|
//
|
2026-03-24 01:22:53 +00:00
|
|
|
// Copyright (c) 2026 Röck+Cöde VoF. and the DiscogsService project authors
|
2025-10-12 13:25:25 +00:00
|
|
|
// Licensed under Apache license v2.0
|
|
|
|
|
//
|
|
|
|
|
// See LICENSE for license information
|
|
|
|
|
// See CONTRIBUTORS for the list of DiscogsService project authors
|
|
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
//
|
|
|
|
|
// ===----------------------------------------------------------------------===
|
|
|
|
|
|
2026-03-24 01:22:53 +00:00
|
|
|
/// A representation of all the possible validation errors that could be thrown while validating an input.
|
2025-10-13 00:54:17 +00:00
|
|
|
public enum InputValidationError: Error {
|
2025-10-12 13:25:25 +00:00
|
|
|
/// An input is empty.
|
|
|
|
|
case inputIsEmpty
|
|
|
|
|
/// An input is nil.
|
|
|
|
|
case inputIsNil
|
2025-10-13 00:54:17 +00:00
|
|
|
/// An input is not camel-case.
|
|
|
|
|
case inputNotCamelCase
|
2025-10-12 19:33:45 +00:00
|
|
|
/// An input does not comply with the consumer key requirements.
|
|
|
|
|
case inputNotConsumerKey
|
|
|
|
|
/// An input does not comply with the consumer secret requirements.
|
|
|
|
|
case inputNotConsumerSecret
|
2025-10-13 00:54:17 +00:00
|
|
|
/// An input is not a semantic version.
|
|
|
|
|
case inputNotSemanticVersion
|
|
|
|
|
/// An input is not a URL.
|
|
|
|
|
case inputNotURL
|
2025-10-12 19:33:45 +00:00
|
|
|
/// An input does not comply with the user token requirements.
|
|
|
|
|
case inputNotUserToken
|
2025-10-12 13:25:25 +00:00
|
|
|
}
|