mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
Merge w/ master
This commit is contained in:
@@ -42,6 +42,8 @@ extension Validator {
|
||||
return value
|
||||
}
|
||||
|
||||
/// Validate the given value and then return it if valid.
|
||||
/// throws if invalid.
|
||||
public static func validate(_ value: To) throws -> To {
|
||||
let _ = try transform(value)
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user