Skip to content

Validate email address with ParseAddress #345

@darksnow

Description

@darksnow

Is it possible to validate email addresses using the Go built in ParseAddress function instead of a regexp?

Looking at https://cs.opensource.google/go/go/+/master:src/net/mail/message.go shows how complex correctly validating an email address is but I can't see a way to use that function in Authboss, or any regexp in the above code that I can apply to MustMatch.

Perhaps a good solution could be to add a ValidationFunction option to Rules which takes a func(string) bool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions