portfolio/api/service/validate/validateUser.go

15 lines
202 B
Go
Raw Normal View History

2024-03-13 15:54:09 +01:00
package validate
import (
2024-09-12 15:34:45 +02:00
"portfolio/api/types"
2024-03-13 15:54:09 +01:00
)
2024-09-12 15:34:45 +02:00
func UserIsValid(u *types.RegisterUser) bool {
2024-03-13 15:54:09 +01:00
if len(u.Name) > 0 &&
2024-05-19 17:49:20 +02:00
len(u.Email) > 0 &&
len(u.Password) > 0 {
2024-03-13 15:54:09 +01:00
return true
}
return false
}