Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. type User struct {
  2. Username string
  3. Password string
  4. Email string
  5. }
  6.  
  7. func (c App) Register(user User) revel.Result {
  8. c.Validation.Required(user.Username).Message("Missing username")
  9. c.Validation.Required(user.Password).Message("Missing password")
  10. c.Validation.Required(user.Email).Message("Missing email")
  11. if c.Validation.HasErrors() {
  12. c.Validation.Keep()
  13. c.FlashParams()
  14. }
  15. return c.Redirect(App.Index)
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement