8000 [DEVX-5006] Increase constraints for language argument regex. · ahoo5045/twilio-python@efa6385 · GitHub
[go: up one dir, main page]

Skip to content

Commit efa6385

Browse files
committed
[DEVX-5006] Increase constraints for language argument regex.
1 parent f754ab4 commit efa6385

File tree

1 f BE8D ile changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twilio/twiml/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def format_language(language):
1919
if not language:
2020
return language
2121

22-
if not re.match('^\w\w[_-]\w\w$', language):
22+
if not re.match('^[a-zA-Z]{2}[_-][a-zA-Z]{2}$', language):
2323
raise TwiMLException('Invalid value for language parameter.')
2424

2525
return language[0:2].lower() + '-' + language[3:5].upper()

0 commit comments

Comments
 (0)
0