Open ohjimijimijimi opened 3 months ago
The email format constraint currently uses the FILTER_VALIDATE_EMAIL to validate email addresses.
Email addresses with unicode characters will not pass validation even if they are consider valid from as international email addresses.
This problem could be improved by adding FILTER_FLAG_EMAIL_UNICODE in https://github.com/swaggest/php-json-schema/blob/2b99251f31046f682b120fb807fea8ab688a493e/src/Constraint/Format.php#L55
filter_var($data, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE) ? null : 'Invalid email';
Context
The email format constraint currently uses the FILTER_VALIDATE_EMAIL to validate email addresses.
Email addresses with unicode characters will not pass validation even if they are consider valid from as international email addresses.
This problem could be improved by adding FILTER_FLAG_EMAIL_UNICODE in https://github.com/swaggest/php-json-schema/blob/2b99251f31046f682b120fb807fea8ab688a493e/src/Constraint/Format.php#L55