The fix is included in ui-components 1.1.23 https://github.com/ManageIQ/manageiq-ui-classic/pull/5479 https://github.com/ManageIQ/manageiq-ui-service/pull/1540
New commit detected on ManageIQ/ui-components/hammer: https://github.com/ManageIQ/ui-components/commit/fb9f75d35468feb951991a4d3d6424769ed5ea21 commit fb9f75d35468feb951991a4d3d6424769ed5ea21 Author: Martin Hradil <himdel> AuthorDate: Tue Apr 2 10:45:01 2019 -0400 Commit: Martin Hradil <himdel> CommitDate: Tue Apr 2 10:45:01 2019 -0400 Merge pull request #378 from eclarizio/add_validator_rule_attribute_to_update Allow validator_rule to be updated in case of dynamic text boxes (cherry picked from commit 851569e401f83b1fc7d8fca2340ed3fefe1ea3c7) https://bugzilla.redhat.com/show_bug.cgi?id=1702064 src/dialog-user/components/dialog-user/dialogField.spec.ts | 2 +- src/dialog-user/components/dialog-user/dialogUser.spec.ts | 20 +- src/dialog-user/components/dialog-user/dialogUser.ts | 1 + src/dialog-user/services/dialogData.spec.ts | 22 + src/dialog-user/services/dialogData.ts | 2 +- 5 files changed, 36 insertions(+), 11 deletions(-)
Created attachment 1561884 [details] datastore I have tested this BZ with datastore and dialog and refresh works fine, but I am not able figure out regex to be used. Could you please help.
Created attachment 1561885 [details] testing dialog
You'll just have to add something like: $evm.object['validator_rule'] = "^1234" to the automate method that the text-box dialog field is using, but this just sets a single validator rule and doesn't ensure that it can be changed, so you'll have to do something like: if ($evm.root['template'] == "Citrix10") { $evm.object['validator_rule'] = "^1234" } else { $evm.object['validator_rule'] = "^4321" } Then when you pick Citrix10 from the dropdown, the validation should only pass with strings that start with "1234", and if you pick anything else, only strings that start with "4321" should pass validation. Hopefully that helps!
Niyaz, Iust configured your appliance with the same automate code and catalog/service dialog configurations, but the regex is still not working. I noticed there is now a yes/no option for validator in the service dialog. Perhaps this value needs to be explicitly set in the automate method that populates the 2 dynamic service dialog elements. One thing I noticed, I manually set the validator option to "yes" and inputted a regex validator expression "^MAX[A-Za-z0-9\-\_]{1,40}$" from within the Web UI. This worked. However, I disabled the validator option, yet, the regex validator "^MAX[A-Za-z0-9\-\_]{1,40}$" is still being used despite my automate method populating the regex validator with another expression. The only other thing, once you turn the validator option to "yes" save it, then edit it to "no" and save, any other time you edit it, the option is stuck between "yes" and "no". The service catalog and service dialog are both named "regex-test". I created a automate domain "Yoder", with namespace "DynamicDialogs" and class "Dialogs", otherwise, everything else should be the same as before. Kind Regards,
New commit detected on ManageIQ/manageiq/hammer: https://github.com/ManageIQ/manageiq/commit/b739a7820ccec248a82111a32c8b095884094443 commit b739a7820ccec248a82111a32c8b095884094443 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue May 7 14:40:00 2019 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue May 7 14:40:00 2019 -0400 Merge pull request #18743 from eclarizio/allow_textarea_dynamic_attributes Allow textarea boxes to dynamically set validator type and rule (cherry picked from commit 5bd2a9e8f2465282115ce843ce3b6d07e8efd551) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1702064 app/models/dialog_field_text_area_box.rb | 2 +- spec/models/dialog_field_text_area_box_spec.rb | 12 +- 2 files changed, 9 insertions(+), 5 deletions(-)
Verified in Version 5.10.4.2.20190508174256_282f74e
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1247