Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated email validation is not working #1048

Open
anukeshi opened this issue Jan 3, 2024 · 0 comments
Open

Repeated email validation is not working #1048

anukeshi opened this issue Jan 3, 2024 · 0 comments
Labels
Bug Reports and/or fixes a bug Go Go language support Good First Issue Newcomer-friendly issue

Comments

@anukeshi
Copy link

anukeshi commented Jan 3, 2024

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 example+sample@email.com 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 example+sample@email.com 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.

@rodaine rodaine added Bug Reports and/or fixes a bug Good First Issue Newcomer-friendly issue labels Jan 3, 2024
@chrispine chrispine added the Go Go language support label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reports and/or fixes a bug Go Go language support Good First Issue Newcomer-friendly issue
Projects
None yet
Development

No branches or pull requests

3 participants