Writing tests for the Forms package
This commit is contained in:
@ -100,8 +100,8 @@ func (m *Repository) PostMakeReservation(w http.ResponseWriter, r *http.Request)
|
||||
form := forms.New(r.PostForm)
|
||||
|
||||
form.Required("first_name", "last_name", "email")
|
||||
form.MinLength("first_name", 2, r)
|
||||
form.IsEmail("email", r)
|
||||
form.MinLength("first_name", 2)
|
||||
form.IsEmail("email")
|
||||
|
||||
if !form.Valid() {
|
||||
data := make(map[string]interface{})
|
||||
|
Reference in New Issue
Block a user