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

Validate value of domain property #227

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion helm/flowforge/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"type": "string"
},
"domain": {
"type": "string"
"type": "string",
"pattern": "^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,6}$"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the \\ because we need to escape the escape char in the sting?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've limited top level domains to between 2-6 chars

This is the current list which already has longer version (e.g. 11 for ACCOUNTANTS, or 15 for AMERICANEXPRESS )
https://data.iana.org/TLD/tlds-alpha-by-domain.txt

https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_domain_name

TLDs can contain special as well as latin characters. A TLD's maximum length is 63 characters, although most are around 2–3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the \ because we need to escape the escape char in the sting?
Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied a change which allows TLD to be 25 characters - the longest from the IANA list at the time of writing.

},
"baseURL": {
"type": "string"
Expand Down
Loading