URL
The url type — a string validated as a URL.
Last updated
Was this helpful?
The url type — a string validated as a URL.
url is a string shortcut (see String Types) whose value MUST be a valid URL. It shares the string MemberDef and adds URL-format validation.
Quote URL values. A URL contains
:and/, which end an unquoted (open) string, so URLs must be written as quoted strings.
website: url
---
~ 'https://example.com' # ✓
~ "https://example.com/p?q=1" # ✓
~ 'not a url' # ✗ invalid-urlRestrict to a fixed set with choices:
homepage: { url, choices: ['https://a.com', 'https://b.com'] }
---
~ 'https://a.com' # ✓Last updated
Was this helpful?
Was this helpful?
