Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private struct InputUser: Decodable {
- var email: String
- var password: String
- }
- private struct InputUserContract: ModelContract {
- typealias M = InputUser
- let email: PropertyPolicy = (\M.email, EmailValidator()))
- let password: PropertyPolicy = (\M.password, StringValidator(length: (min: 8, max: 20)))
- }
Add Comment
Please, Sign In to add comment