[BUG] schema: invalid path "username"
- Dominant language
- Go
- Stars
- 25.6k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Browser shows:
schema: invalid path "username"schema: invalid path "username"
**To Reproduce**
Steps to reproduce the behavior:
codes as follow:
```
//main.go
user := mvc.New(app.Party("/my"))
user.Register(
userService,
sessManager.Start,
)
user.Handle(new(controller.MyController))
//my_controller.go
type MyController struct {
Ctx iris.Context
Service service.UserService
Session *sessions.Session
}
func (c *MyController) GetLogin() mvc.Result {
return mvc.View{
Name: "my/login.html",
}
}
type loginForm struct {
Username string `form:"username"`
}
func (c *MyController) PostLogin(form loginForm) mvc.Result {
fmt.Println(form.Username)
return mvc.Response{
Path: "/my/login",
}
}
//my/login.html
Username
Login
```
After click the login button, the page shows :
schema: invalid path "username"schema: invalid path "username"
**Desktop (please complete the following information):**
- OS: debian
**iris.Version**
- v12.2.11
Contributor guide
Assessment
This issue has not been assessed yet.