Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format: hostname is too restrictive #129

Closed
lphooge opened this issue Feb 20, 2015 · 1 comment
Closed

format: hostname is too restrictive #129

lphooge opened this issue Feb 20, 2015 · 1 comment

Comments

@lphooge
Copy link

lphooge commented Feb 20, 2015

Currently the regexp ^[_a-z]+.([_a-z]+.?)+$ is used to validate hostnames.
However hyphens should be allowed in the middle, also digits.

Perhaps see http://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address for better regular expressions usable for this.

There are multiple RFCs with slight differences in what is allowed. Unfortunately json-schema refers to RFC 1034, which does not actually define what is permissible in a host name at all, other than that it contains dots (and maybe not even that if it is relative and consists of only one label).

@csimplestring
Copy link

+1. We encountered the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants