validatorjs / validator.js

String validation
MIT License
23.06k stars 2.3k forks source link

Should isURL accept accented urls or should make this validation optional? #2424

Open toofff opened 3 months ago

toofff commented 3 months ago

Describe the bug The following url are valid: https://my-ùrl.com & https://my-url.coù

Should accented URLs be allowed?

Shouldn't we add an option to invalidate URLs with accents if the option is enabled?

Thank you for your feedback

Additional context Validator.js version: 13.11.0 Node.js version: 20.11.0 OS platform: windows, linux & macOS

toofff commented 3 months ago

If there's a development to be made for this pull request, I'm willing to take care of it. I'd just like to know in which direction you want to go with this?

Is this a bug for you? Or could we create an option not to accept accented urls?

I discovered this problem because my API uses Apache's UrlValidator Java class and accented urls are not accepted.