Guest User

Untitled

a guest
Jul 7th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. private struct InputUser: Decodable {
  2. var email: String
  3. var password: String
  4. }
  5.  
  6. private struct InputUserContract: ModelContract {
  7. typealias M = InputUser
  8.  
  9. let email: PropertyPolicy = (\M.email, EmailValidator()))
  10. let password: PropertyPolicy = (\M.password, StringValidator(length: (min: 8, max: 20)))
  11. }
Add Comment
Please, Sign In to add comment