Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type User struct {
- Username string
- Password string
- Email string
- }
- func (c App) Register(user User) revel.Result {
- c.Validation.Required(user.Username).Message("Missing username")
- c.Validation.Required(user.Password).Message("Missing password")
- c.Validation.Required(user.Email).Message("Missing email")
- if c.Validation.HasErrors() {
- c.Validation.Keep()
- c.FlashParams()
- }
- return c.Redirect(App.Index)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement