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

Features/feature name validation #1778

Merged
merged 7 commits into from
Dec 21, 2022
Merged

Conversation

kyle-ssg
Copy link
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?

Adding RegEx Validation

feature-name-regex.mov

Only allowing valid RegEx's
image

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2022

Uffizzi Preview deployment-9188 was deleted.

@matthewelwell
Copy link
Contributor

Using this PR as a place to put this comment but I feel like this is an API issue more than a FE issue.

I tested this using the regex string [a-z]+ and then was able to create a feature called test_feature, whereas I was expecting it to fail. The issue being that I hadn't explicitly stated that I wanted the regex to match the entire string (i.e. ^[a-z]+$).

The question, however, is whether we want to automatically wrap the regex string in ^ and $ to ensure people don't get unusual behaviour like this? Or are we happy giving them full control, but perhaps adding wording that they should wrap their regex in these characters?

Also, I noticed that there is an extra $ being prepended to the regex string in the UI warning on the feature create page which seems a bit misleading.

image

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

I think it would be nice, as an improvement to add a 'tester' input next to the input on the project settings page. Not essential but it would be nice.

@kyle-ssg kyle-ssg linked an issue Dec 19, 2022 that may be closed by this pull request
@kyle-ssg
Copy link
Member Author

I think it would be nice, as an improvement to add a 'tester' input next to the input on the project settings page. Not essential but it would be nice.

Added

@matthewelwell matthewelwell merged commit f0cf07f into main Dec 21, 2022
@matthewelwell matthewelwell deleted the features/feature_name_validation branch December 21, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to implement validation of feature names
2 participants