Open Narazaka opened 1 week ago
Use uri
instead.
But I would like to state that it is a URL, not a URI. The https://example--example.example.com/
is also valid as a URL.
https://github.com/ajv-validator/ajv-formats/blob/master/src/formats.ts#L63
I'm following the ajv
's validation logic.
Need to investigate the such example--example
sub-domain is valid.
I think valid because the domains that has double or more hyphen actually exists
and RFC says only that leading and trailing hyphen is not allowed.
hostname = *[ domainlabel "." ] toplabel
domainlabel = alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit
toplabel = alpha | alpha *[ alphadigit | "-" ] alphadigit
To begin with, the xn--prefix of the internationalized domain is the typical double hyphen. (That is why some domain registrars that use internationalized domains go out of their way to state that they do not tolerate double hyphens in the third and fourth characters.)
Bug Report
📝 Summary
Write a short summary of the bug in here.
💻 Code occuring the bug