manageiq
manageiq copied to clipboard
Ability to customize validation failure message for custom dialog elements
Currently it is not possible to directly update the validation failure message within a custom dialog Text Box element. The default message is set to "Entered text should match the format:') + ' ' + regexPattern", would be awesome to be able to customize this message displayed to users.
@brandonfilion Can you copy that screenshot you had in gitter to here?
@akhilkr128 Can you take a look at this one? I dug in a little bit and found this unrelated but interesting bit in the kubevirt dialogs: https://github.com/ManageIQ/manageiq-providers-kubevirt/blob/0a0f34325f84a543502f6e8e7de9a2726d1c81bc/content/miq_dialogs/miq_provision_kubevirt_dialogs_template.yaml#L187-L188
It looks like the dialogs possibly already have a way to set a required_regex_fail_details key, but I'm not sure those can be used for custom dialogs which is what this is about. I think it would be a very useful feature to support this, though.
Here's the code using it: https://github.com/ManageIQ/manageiq/blob/9e063bb9152012e1b0232207a6f2ddecb7c8128d/app/models/miq_request_workflow/dialog_field_validation.rb#L34-L43
Working on this will update the findings here.
@Fryguy. Yes, we can add a fail message option under validator field.
Working on this.
This change resides under the angular space https://github.com/ManageIQ/ui-components. I can see that we have a plan to change this view to react https://github.com/ManageIQ/manageiq-ui-classic/issues/7603. @Fryguy/ @chessbyte, do I need to wait for the react conversion? Or can I move forward with angular for now?
@Fryguy/ @chessbyte, do I need to wait for the react conversion? Or can I move forward with angular for now?
@kavyanekkalapu what are your thoughts on this?
@akhilkr128 I would suggest to go a head and do it in angular. We have a long way to convert ui-components to react.
Sure, I feel the same.
This issue has been automatically marked as stale because it has not been updated for at least 3 months.
If you can still reproduce this issue on the current release or on master
, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
This issue has been automatically closed because it has not been updated for at least 3 months.
Feel free to reopen this issue if this issue is still valid.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.