Code Monkey home page Code Monkey logo

Comments (6)

WikiRik avatar WikiRik commented on June 12, 2024 1

This is a duplicate of #1875

The spaces in the URL should have been encoded to '%20' but not all have, causing the validator to (in my opinion correctly) return false.

Btw; When I got a notification about this issue in my mail, Gmail on Android also did not recognize it as a valid URL.

from validator.js.

prionkor avatar prionkor commented on June 12, 2024

thanks, I agree with you..

from validator.js.

prionkor avatar prionkor commented on June 12, 2024

@WikiRik This is another example form google, that validator.js showing as invalid. It doesn't have space.

JSFiddle: https://jsfiddle.net/sisir/uj6ywev9/
URL:

https://www.google.com/localservices/prolist?g2lbs=AIQllVwJHUEZa2n1HMgVvZN2pJQMN8LhNEPrYKD_Bn_PajSeRO8C-Mgag8GBQEUNR9_WIGmbmG7vsZv5IvHmPxJCn4EyxEdqaOr8JnMW1g379VwR51TgEeqLocMQWR8h8CbkyUWMbzvgkAi5lAa8-Z5ipjm37kn9R7xEigKjyZcZOm_NyIgNPmM%3D&hl=en-US&gl=us&cs=1&ssta=1&q=damp%20solving%20water%20and%20mold%20removal%20orlando%20fl&oq=damp%20solving%20water%20and%20mold%20removal%20fl&slp=MgA6HENoTUk0TWVKcWZYOWd3TVY2NEZRQmgwUWRRQU9SAggCYAB61gNDaVprWVcxd0lITnZiSFpwYm1jZ2QyRjBaWElnWVc1a0lHMXZiR1FnY21WdGIzWmhiQ0JtYkVpMDJ2LUhyYkdBZ0FoYVJoQUFFQUVRQWhBREVBUVFCUmdBR0FFWUFoZ0VHQVVZQmlJbVpHRnRjQ0J6YjJ4MmFXNW5JSGRoZEdWeUlHRnVaQ0J0YjJ4a0lISmxiVzkyWVd3Z1ptd3FCQWdERUFXU0FTQjNZWFJsY2w5a1lXMWhaMlZmY21WemRHOXlZWFJwYjI1ZmMyVnlkbWxqWlpvQkkwTm9Xa1JUVldoT1RVYzVibE13VmtwUk1FWnVVMVZTVjJGcVZqRmlSMVp1UlVGRnFnR1dBUW9JTDIwdk1EZ3pPR1lLQ0M5dEx6QXllSEo1Q2dndmJT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vbl9zZXJ2aWNlEjUSEgm_KlaRZXbBiBHQTsdb0xMu9yIHRmxvcmlkYSoUDciUig4V4PnDyx1QX3oSJazjVNAwABojZGFtcCBzb2x2aW5nIHdhdGVyIGFuZCBtb2xkIHJlbW92YWwiJmRhbXAgc29sdmluZyB3YXRlciBhbmQgbW9sZCByZW1vdmFsIGZsKiBXYXRlciBkYW1hZ2UgcmVzdG9yYXRpb24gc2VydmljZToCMAI%3D

Is there a way to find out why it is failing?

from validator.js.

WikiRik avatar WikiRik commented on June 12, 2024

You can just debug it, but I expect the URL is too long and therefore marked as invalid

from validator.js.

prionkor avatar prionkor commented on June 12, 2024

okay, I did a test with php, and it passed as valid:

if (filter_var($url, FILTER_VALIDATE_URL)) {
  echo("$url is a valid URL");
} else {
  echo("$url is not a valid URL");
}

from validator.js.

prionkor avatar prionkor commented on June 12, 2024

Thank you for the hint, I see there is a limit for url length. I have set validate_length to false. now it is working.

from validator.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.