Vapor Documentation Beta

Protocol Validator​Result

public protocol ValidatorResult
%3 ValidatorResult ValidatorResult ValidatorResults.Email ValidatorResults.Email ValidatorResults.Email->ValidatorResult ValidatorResults.NotFound ValidatorResults.NotFound ValidatorResults.NotFound->ValidatorResult ValidatorResults.In ValidatorResults.In ValidatorResults.In->ValidatorResult ValidatorResults.CharacterSet ValidatorResults.CharacterSet ValidatorResults.CharacterSet->ValidatorResult ValidationResult ValidationResult ValidationResult->ValidatorResult ValidatorResults.Empty ValidatorResults.Empty ValidatorResults.Empty->ValidatorResult ValidatorResults.Codable ValidatorResults.Codable ValidatorResults.Codable->ValidatorResult ValidatorResults.Case ValidatorResults.Case ValidatorResults.Case->ValidatorResult ValidatorResults.Invalid ValidatorResults.Invalid ValidatorResults.Invalid->ValidatorResult ValidatorResults.URL ValidatorResults.URL ValidatorResults.URL->ValidatorResult ValidatorResults.NilIgnoring ValidatorResults.NilIgnoring ValidatorResults.NilIgnoring->ValidatorResult ValidatorResults.Valid ValidatorResults.Valid ValidatorResults.Valid->ValidatorResult ValidatorResults.TypeMismatch ValidatorResults.TypeMismatch ValidatorResults.TypeMismatch->ValidatorResult ValidatorResults.Skipped ValidatorResults.Skipped ValidatorResults.Skipped->ValidatorResult ValidatorResults.Nested ValidatorResults.Nested ValidatorResults.Nested->ValidatorResult ValidatorResults.Missing ValidatorResults.Missing ValidatorResults.Missing->ValidatorResult ValidatorResults.Nil ValidatorResults.Nil ValidatorResults.Nil->ValidatorResult ValidatorResults.Not ValidatorResults.Not ValidatorResults.Not->ValidatorResult ValidatorResults.Range ValidatorResults.Range ValidatorResults.Range->ValidatorResult ValidatorResults.Or ValidatorResults.Or ValidatorResults.Or->ValidatorResult ValidatorResults.And ValidatorResults.And ValidatorResults.And->ValidatorResult

Types Conforming to Validator​Result

ValidationResult
ValidatorResults.Nested
ValidatorResults.Skipped
ValidatorResults.Missing
ValidatorResults.NotFound
ValidatorResults.Codable
ValidatorResults.Invalid
ValidatorResults.TypeMismatch
ValidatorResults.And

ValidatorResult of "And" Validator that combines two ValidatorResults. If both results are successful the combined result is as well.

ValidatorResults.Case

ValidatorResult of a validator thaat validates whether the data can be represented as a specific Enum case.

ValidatorResults.CharacterSet

ValidatorResult of a validator that validates that a String contains characters in a given CharacterSet.

ValidatorResults.Email

ValidatorResult of a validator that validates whether a String is a valid email address.

ValidatorResults.Empty

ValidatorResult of a validator that validates whether the data is empty.

ValidatorResults.In

ValidatorResult of a validator that validates whether an item is contained in the supplied sequence.

ValidatorResults.Nil

ValidatorResult of a validator that validates that the data is nil.

ValidatorResults.NilIgnoring

ValidatorResult of a validator that ignores nil values.

ValidatorResults.Not
ValidatorResults.Or

ValidatorResult of "Or" Validator that combines two ValidatorResults. If either result is successful the combined result is as well.

ValidatorResults.Range

ValidatorResult of a validator that validates whether the input is within a supplied range.

ValidatorResults.URL

ValidatorResult of a validator that validates whether a string is a valid URL.

ValidatorResults.Valid

ValidatorResult of a validator that validates that the data is valid`.

Requirements

is​Failure

var isFailure: Bool

success​Description

var successDescription: String?

failure​Description

var failureDescription: String?