Bug #12078
closed'List' validation for Smart Class params should work for any string coercible value
Description
Description of problem:
After Overriding the value of Smart class Parameter and validating the new default value with validator type 'list' fails.
Version-Release number of selected component (if applicable):
foreman-1.10.0-0.develop.201510011619git0033595.el7.noarch
foreman-release-scl-1-1.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Override the default value of a smart class parameter.
2. Select the key type as array/string.
3. Give new default value as [1]/1. (Just an example, anything can be provided)
4. In Optional Input Validator, Select validator type as list.
5. In Validator Rule, give some list of values in which the new default value should be present. In my case its [1,2].
6. Try to submit this change.
Actual results:
1. Validation Failed.
2. Not allowing to submit the change and labelling '[1] is not one of [1,2]' or '1 is not one of [1,2]' for Default Value field.
Expected results:
Should be allowed to submit the change and validation should pass as obvious in above case.
Files
Updated by The Foreman Bot over 9 years ago
- Status changed from Need more information to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2788 added
- Pull request deleted (
)
Updated by Daniel Lobato Garcia over 9 years ago
- Subject changed from In Smart Class Parameter, the validation for validator type 'list' is not working as expected. to 'List' validation for Smart Class params should work for any string coercible value
Updated by Ori Rabin over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100