-
Notifications
You must be signed in to change notification settings - Fork 900
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
UI: Allow for specification of max length of text box and text area in service dialog element creation #1226
Comments
@gmcculloug @dclarizio Please take a look. |
Completely agree that we need to expose this property in the dialog editor. To take it a step further we might want to also expose a minimum length as well. While this could be achieved through the regex validation rule we would be able to provide a better error message if it was based off a separate field property. We are seeing the same requirement coming from other integrations like AWS Cloudformation and Openstack Heat. cc @bzwei @eclarizio |
Looks like a good enhancement and it will then enforce the max when creating the element on the screen as well. |
Hi, Is this available now? I have a use case that require more than 50 characters on a textbox. |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
+1 |
Pls implement this. |
+1 |
@eclarizio can you provide an update on this issue. |
@JPrause as @romanblanco mentioned in the referenced PR, the way that all new dialogs are rendered is through the dialog-user component in the ui-components repository where the max length is no longer limited. |
Thanks @eclarizio |
Currently the max length allowed for both text boxes and text areas is hard coded. The values are 50 for a text box and 8196 for a text area. They can be found at vmdb/app/views/miq_ae_customization/_dialog_field_form.html.haml on lines 60 and 49 respectively.
The max length can be too short for a text box, and unnecessarily long for a text area. One of the main issues I have run into with the max length of the text boxes is that URLs can easily be longer than 50 characters. The reason that we want the URLs to be entered in a text box instead of a text area is that a text area will allow for newline characters, which can cause issues if the input is not sanitized correctly. Currently the ability to add a validator rule to a text area (like with a text box) is not implemented.
Max length should be added as an optional field in the "Options" box when creating a new service dialog element. If no value is specified, keep the default.
Mockup attached

The text was updated successfully, but these errors were encountered: