Static Methodvapor 4.114.1Vapor
range(_:)
Validates that the data is greater than or equal the supplied lower bound using PartialRangeFrom
.
static func range(_ range: PartialRangeFrom<T>) -> Validator<T>
Validates that the data is greater than or equal the supplied lower bound using PartialRangeFrom
.
static func range(_ range: PartialRangeFrom<T>) -> Validator<T>
s5Vapor9ValidatorVAASLRzrlE5rangeyACyxGs16PartialRangeFromVyxGFZ
What are these?8DLN2
where T:Comparable, T:Decodable, 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 PartialRangeFrom<Bound> where Bound : Comparable
A partial interval extending upward from a lower bound.
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
protocol Decodable
A type that can decode itself from an external representation.
protocol Sendable
static func range(_ range: ClosedRange<T>) -> Validator<T>
Validates that the data is within the supplied ClosedRange
.
static func range(_ range: PartialRangeThrough<T>) -> Validator<T>
Validates that the data is less than or equal to the supplied upper bound using PartialRangeThrough
.