Static Methodvapor 4.114.1Vapor
range(_:)
Validates that the data is within the supplied Range
.
static func range(_ range: Swift.Range<T>) -> Validator<T>
Validates that the data is within the supplied Range
.
static func range(_ range: Swift.Range<T>) -> Validator<T>
where T:Decodable, T:Strideable, T:Sendable
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct Validator<T> where T : Decodable, T : Sendable
@frozen struct Range<Bound> where Bound : Comparable
A half-open interval from a lower bound up to, but not including, an upper bound.
protocol Decodable
A type that can decode itself from an external representation.
protocol Strideable<Stride> : Comparable
A type representing continuous, one-dimensional values that can be offset and measured.
protocol Sendable