poppinss / indicative

Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
https://indicative.adonisjs.com/
MIT License
417 stars 52 forks source link

indicative fails to validate `localhost` as a valid URL #134

Closed rlupton20 closed 7 years ago

rlupton20 commented 7 years ago

Observed on indicative v2.2.1.

URL http://localhost/test fails to validate, despite being a valid url. http://localhost.localdomain/test validates fine. I've not looked, but I suspect the url validator is looking for a fully qualified domain name.

There is an argument both ways as to whether the url validator should accept unqualified domain names - my slant would be that it should.

In a similar vein to #130.