I installed the booking app and build a small app by myself and both suffer from the inability of displaying flash errors as shown here: https://github.com/revel/revel/blob/master/samples/booking/app/views/hotels/settings.html
The example view I use in my own app is https://gist.github.com/daemonfire300/10581488 and iterating over .error works perfectly fine.
Am I missing something?
I wrote a controller like this (please note that I used the default App instead of the UserController that you use in your example):
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)
}
When I miss a field on the form (for example the password), I do get the errors and all previous fields' values are restored, as shown here.