networknt / json-schema-validator

A fast Java JSON schema validator that supports draft V4, V6, V7, V2019-09 and V2020-12
Apache License 2.0
800 stars 320 forks source link

EmailValidator limits the user length to be <= 64 #1040

Closed sangharshgautam closed 1 month ago

sangharshgautam commented 1 month ago

Hi,

I see that the EmailValidator is limiting the user length in an email to be less than or equal to 64 Ref,

I was wondering if there is a reference to any standard being used here.

The RFC 4.1.2 listed on on https://json-schema.org/understanding-json-schema/reference/string#built-in-formats) does not suggest any such limitation.

Please can you advice as this is being reported as a bug in our application which uses json-schema-validator library,

Best regards, Sangharsh

image

stevehu commented 1 month ago

I think it is implemented based on common sense. I haven't seen any email username longer than 64, do you have any use case that deals with longer email? If there is a valid use case, we can adjust the validation rule. Thanks.

justin-tay commented 1 month ago

RFC 5321 in section 4.5.3.1.1

The maximum total length of a user name or other local-part is 64 octets.