Advertisement
Guest User

Untitled

a guest
Sep 29th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1.  
  2. import formencode
  3.  
  4.  
  5. class AddUserSchema(formencode.Schema):
  6.     allow_extra_fields = True  # for submit button
  7.  
  8.     name = formencode.validators.String(not_empty=True)
  9.  
  10.     email = formencode.validators.Email(resolve_domain=False)
  11.     password = formencode.validators.PlainText(not_empty=True)
  12.  
  13.  
  14. class LoginSchema(formencode.Schema):
  15.     allow_extra_fields = True  # for submit button
  16.  
  17.     username = formencode.validators.String(not_empty=True)
  18.     password = formencode.validators.PlainText(not_empty=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement