1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: add basic sign up instructions

This commit is contained in:
Ferdinand Mütsch
2020-05-24 21:42:15 +02:00
parent 2cca2cb0bb
commit 625994d1e9
8 changed files with 57 additions and 12 deletions

View File

@@ -16,3 +16,9 @@ type Signup struct {
Password string `schema:"password"`
PasswordRepeat string `schema:"password_repeat"`
}
func (s *Signup) IsValid() bool {
return len(s.Username) >= 3 &&
len(s.Password) >= 6 &&
s.Password == s.PasswordRepeat
}