We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The validDomain function does not permit/validate domains with hyphens.
To Reproduce Steps to reproduce the behavior:
Expected behavior The validDomain function should permit/validate domains with hyphens.
The text was updated successfully, but these errors were encountered:
Example domain name would be "this.is-a-test.net".
Existing expression does not match domains like the above. Here is the expression I used as a workaround.
(?=^.{4,253}$)(^(?:[a-zA-Z0-9](?:(?:[a-zA-Z0-9\-]){0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$)
Applicable code around line 1548 of the installer. I replaced the if statement with the following PCRE interpreted grep.
echo $domain | grep -P '(?=^.{4,253}$)(^(?:[a-zA-Z0-9](?:(?:[a-zA-Z0-9\-]){0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$)' &> /dev/null
Sorry, something went wrong.
Fix issue #1047
5dc7ac2
I've applied your suggestion in the test branch (using Bash's here strings to avoid a pipe).
No branches or pull requests
In raising this issue, I confirm the following:
Describe the bug
The validDomain function does not permit/validate domains with hyphens.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The validDomain function should permit/validate domains with hyphens.
The text was updated successfully, but these errors were encountered: