[MM-22037] Enable uppercase letters in the email (#13794)

* Enable uppercase letters in the email

* Lowercase email on every input

* Remove invalid test
Этот коммит содержится в:
Shota Gvinepadze
2020-02-12 17:51:45 +04:00
коммит произвёл GitHub
родитель 28ef877876
Коммит a7854f1b97
10 изменённых файлов: 25 добавлений и 14 удалений

Просмотреть файл

@@ -393,11 +393,11 @@ func (c *Context) RequireChannelName() *Context {
return c
}
func (c *Context) RequireEmail() *Context {
func (c *Context) SanitizeEmail() *Context {
if c.Err != nil {
return c
}
c.Params.Email = strings.ToLower(c.Params.Email)
if !model.IsValidEmail(c.Params.Email) {
c.SetInvalidUrlParam("email")
}