MCPcopy Create free account
hub / github.com/1Password/for-open-source / IsEmail

Function IsEmail

script/validator.go:163–169  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

161}
162
163func IsEmail(value string) (bool, string, string) {
164 if _, err := mail.ParseAddress(value); err == nil {
165 return true, value, ""
166 }
167
168 return false, value, "is an invalid email"
169}
170
171func IsURL(value string) (bool, string, string) {
172 parsedURL, err := url.ParseRequestURI(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected