MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / validateRecipients

Function validateRecipients

internal/agent/api.go:1523–1535  ·  view source on GitHub ↗
(groups ...[]string)

Source from the content-addressed store, hash-verified

1521func ValidateRecipients(groups ...[]string) error { return validateRecipients(groups...) }
1522
1523func validateRecipients(groups ...[]string) error {
1524 for _, group := range groups {
1525 for _, addr := range group {
1526 if addr == "" {
1527 return errors.New("recipient address must not be empty")
1528 }
1529 if _, err := mail.ParseAddress(addr); err != nil {
1530 return fmt.Errorf("invalid recipient %q: %w", addr, err)
1531 }
1532 }
1533 }
1534 return nil
1535}
1536
1537// validateDomain runs the IDNA "Lookup" profile against a user-supplied
1538// domain string. Lookup is the strictest of the four IDNA profiles and

Callers 2

ValidateRecipientsFunction · 0.85
TestValidateRecipientsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestValidateRecipientsFunction · 0.68