diff --git a/forms/admin_login.go b/forms/admin_login.go index 89c6ff15..09cf4f97 100644 --- a/forms/admin_login.go +++ b/forms/admin_login.go @@ -56,7 +56,7 @@ func NewAdminLoginWithConfig(config AdminLoginConfig) *AdminLogin { // Validate makes the form validatable by implementing [validation.Validatable] interface. func (form *AdminLogin) Validate() error { return validation.ValidateStruct(form, - validation.Field(&form.Email, validation.Required, validation.Length(1, 255), is.Email), + validation.Field(&form.Email, validation.Required, validation.Length(1, 255), is.EmailFormat), validation.Field(&form.Password, validation.Required, validation.Length(1, 255)), ) } diff --git a/forms/user_email_login.go b/forms/user_email_login.go index 1b8d73a9..122f50c9 100644 --- a/forms/user_email_login.go +++ b/forms/user_email_login.go @@ -55,7 +55,7 @@ func NewUserEmailLoginWithConfig(config UserEmailLoginConfig) *UserEmailLogin { // Validate makes the form validatable by implementing [validation.Validatable] interface. func (form *UserEmailLogin) Validate() error { return validation.ValidateStruct(form, - validation.Field(&form.Email, validation.Required, validation.Length(1, 255), is.Email), + validation.Field(&form.Email, validation.Required, validation.Length(1, 255), is.EmailFormat), validation.Field(&form.Password, validation.Required, validation.Length(1, 255)), ) }