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

Modified regex to accept uppercase characters and a forward slash #74

Merged
merged 2 commits into from
Jun 10, 2021
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions adafruit_io/adafruit_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def validate_feed_key(feed_key):
if len(feed_key) > 128: # validate feed key length
raise ValueError("Feed key must be less than 128 characters.")
if not bool(
re.match(r"^[a-z0-9-]+(\.[a-z0-9-]+)?$", feed_key)
re.match(r"^[a-zA-Z0-9-]+((\/|\.)[a-zA-Z0-9-]+)?$", feed_key)
): # validate key naming scheme
raise TypeError(
"Feed key must contain lower case English letters, numbers, dash, and one period."
"Feed key must contain English letters, numbers, dash, and a period or a forward slash."
)


Expand Down