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

Update validation regex to prohibit only numbers for Azure VM provisioning #13730

Merged
merged 1 commit into from
Feb 9, 2017
Merged

Update validation regex to prohibit only numbers for Azure VM provisioning #13730

merged 1 commit into from
Feb 9, 2017

Conversation

djberg96
Copy link
Contributor

@djberg96 djberg96 commented Feb 1, 2017

This is an enhancement to #12947. Apparently, there is an undocumented restriction that a VM cannot contain only numbers. This addresses that.

Original BZ is https://bugzilla.redhat.com/show_bug.cgi?id=1377889

@djberg96 djberg96 changed the title Update validation regex to prohibit only numbers. Update validation regex to prohibit only numbers for Azure VM provisioning Feb 1, 2017
@gmcculloug
Copy link
Member

Tested the expression at www.rubular.com and it does prevent the "cannot contain only numbers" issue but it does not enforce what is stated at the end of the text description: "The first and last character must be an English alphabet character."

Names like "aa1234" and "1234b" appear to be valid. Should that be addressed in this PR as well?

@djberg96
Copy link
Contributor Author

djberg96 commented Feb 2, 2017

@gmcculloug The regex is correct, the description is wrong. Will update shortly.

Edit: Updated description.

@djberg96
Copy link
Contributor Author

djberg96 commented Feb 8, 2017

@gmcculloug Look good?

@gmcculloug
Copy link
Member

I though you meant the :required_regex_fail_details description was wrong. Is "The first and last character must be an English alphabet character" a correct statement? That is still part of the fail_details message.

@djberg96
Copy link
Contributor Author

djberg96 commented Feb 9, 2017

@gmcculloug Ah, I see. Updated message.

@miq-bot
Copy link
Member

miq-bot commented Feb 9, 2017

Checked commit https://github.com/djberg96/manageiq/commit/2eaa6df82f8e54d4db7cd9a30ddc0915527d8a8b with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks good. 🏆

@gmcculloug gmcculloug merged commit 956679a into ManageIQ:master Feb 9, 2017
@gmcculloug gmcculloug added this to the Sprint 54 Ending Feb 13, 2017 milestone Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants