handlers(types): add validation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
11de8de558
commit
e0a7656b2b
@ -4,14 +4,14 @@
|
|||||||
package handlers
|
package handlers
|
||||||
|
|
||||||
type userSignin struct {
|
type userSignin struct {
|
||||||
Username string `form:"username" json:"username"`
|
Username string `form:"username" json:"username" validate:"required,username"`
|
||||||
Password string `form:"password" json:"password"`
|
Password string `form:"password" json:"password" validate:"required,password"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type userSignup struct {
|
type userSignup struct {
|
||||||
Username string `form:"username" json:"username"`
|
Username string `form:"username" json:"username" validate:"required,username"`
|
||||||
Email string `form:"email" json:"email"`
|
Email string `form:"email" json:"email" validate:"required,email"`
|
||||||
Password string `form:"password" json:"password"`
|
Password string `form:"password" json:"password" validate:"required,password"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type userCreate struct {
|
type userCreate struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user