MCPcopy Create free account
hub / github.com/netlify/gotrue / validateEmail

Method validateEmail

api/mail.go:74–83  ·  view source on GitHub ↗
(ctx context.Context, email string)

Source from the content-addressed store, hash-verified

72}
73
74func (a *API) validateEmail(ctx context.Context, email string) error {
75 if email == "" {
76 return unprocessableEntityError("An email address is required")
77 }
78 mailer := a.Mailer(ctx)
79 if err := mailer.ValidateEmail(email); err != nil {
80 return unprocessableEntityError("Unable to validate email address: " + err.Error())
81 }
82 return nil
83}

Callers 4

InviteMethod · 0.95
SignupMethod · 0.95
adminUserCreateMethod · 0.95
UserUpdateMethod · 0.95

Calls 4

MailerMethod · 0.95
unprocessableEntityErrorFunction · 0.85
ValidateEmailMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected