Skip to content

Repeated email validation is not working #1048

@anukeshi

Description

@anukeshi

Hi,

I have 2 definitions for sending invitation to a bunch of emails, and deleting an invitation sent to single email:

When sending an invitation to the email address [email protected] is not throwing any error. Here's the definition for SendInvitation.

message SendInvitation {
    repeated string email_arr = 1 [(validate.rules).repeated.items.string.email = true];
}

But when deleting an invitation sent to the same email [email protected] it throws the following error which is correct and the expected behavior. As it contains '+' symbol, which is not supported in RFC 5322 email standards.
value must be a valid email address | caused by: mail: no angle-addr. Here's the definition for DeleteInvitation.

message DeleteInvitation {
    string email = 1 [(validate.rules).string.email = true];
}

However eventhough both send & delete have same validation, it seems the validation is not properly functioning for send invitation as it has repeated fields. Hence what would be the proper way for validating repeated emails?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReports and/or fixes a bugGoGo language supportGood First IssueNewcomer-friendly issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions