-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This one is just a feature request: you could add some indicator showing whether a value is valid per RFC 7231 using a regular expression:
/^[a-z]{1,8}(?:-[a-z]{1,8})?(?:;q=(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?))?(?:, *[a-z]{1,8}(?:-[a-z]{1,8})?(?:;q=(?:0(?:\.\d{0,3})?|1(?:\.0{0,3})?))?)*$/i
It's very easy to accidentally put a space between the ";q" or assume that something like "en-latn-usa"—which is valid in HTML lang and XML xml:lang attributes—is valid, for example. This would catch those errors.
RFC 7231 §5.3.5: https://tools.ietf.org/html/rfc7231#section-5.3.5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels