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

Adding validation on channel id when adding a channel #795

Merged
merged 2 commits into from
Jan 13, 2021
Merged

Adding validation on channel id when adding a channel #795

merged 2 commits into from
Jan 13, 2021

Conversation

bigbasec
Copy link
Contributor

Adding validation and warnings when adding a channel with an invalid name as the Unique ID could have been blank which would fail and not let the user know.

This change would only allow alphanumeric characters and numbers as well as an underscore character. That should keep it valid when it's added.

@bigbasec bigbasec requested a review from a team as a code owner January 13, 2021 03:55
Signed-off-by: Brian Homeyer <bhomeyer@gmail.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed some indentation errors - don't use tab characters, and please use ESLint to make sure the code is correctly formatted in the future.

@ghys ghys merged commit 9f2bcd9 into openhab:master Jan 13, 2021
ghys pushed a commit that referenced this pull request Jan 13, 2021
Signed-off-by: Brian Homeyer <bhomeyer@gmail.com>
@ghys ghys added bug Something isn't working main ui Main UI patch A PR that has been cherry-picked to a patch release branch labels Jan 13, 2021
@bigbasec bigbasec deleted the fix-channel-add branch January 13, 2021 12:50
@bigbasec
Copy link
Contributor Author

bigbasec commented Jan 13, 2021

Sorry for the indentation, was a quick and dirty done in notepad. Won't happen in the future.

The adjustment you made to the dialog text is not completely accurate, you can also use "_" as far as I can tell without issues.

Also can close the MQTT bug listed above, this fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working main ui Main UI patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants