bible-technology / scripture-burrito

Scripture Burrito Schema & Docs 🌯
http://docs.burrito.bible/
MIT License
21 stars 13 forks source link

Use more complete BCP 47 validation regex #160

Closed rdb closed 4 years ago

rdb commented 4 years ago

The current BCP 47 regex was just inherited from wherever it was taken from. This replaces it with a more complete RegEx, taken from this StackOverflow answer.

This regular expression is fairly relaxed and case-insensitive. We may want to reconsider that. I'll open a separate issue to discuss this.

mvahowe commented 4 years ago

I'd prefer to force everything to lower case, since that addresses one level of "how to compare two language codes" and seems to be allowed in the BCP47 spec.

jag3773 commented 4 years ago

see discussion on #161

mvahowe commented 4 years ago

I think we agreed that we should not enforce any case sensitiveness here so I'm merging this PR.