Skip to content

format: hostname is too restrictive #129

@lphooge

Description

@lphooge

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions