feat: AlertController inputs should be having minlength, maxlength options for text fields
See original GitHub issueFeature Request
Ionic version: [x] 5.x
Describe the Feature Request
As sometimes I need to show alert user and asking him for inputs alert AlertInput
got options for min/max and seems those working for numeric to date fields, but what if I want to limit the length of the text that user provide, so I think maxlength and minlength should be added.
Describe Preferred Solution
Just adding these to AlertInput
and apply the change to the rendered input.
Additional Context This is been requested in the forum and the solution provided with “hack” but seems is not working for some reason. https://forum.ionicframework.com/t/ionic-unable-to-fix-maxlength-for-prompt-input-of-alert-controller/119472
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
AlertController inputs should be having minlength, maxlength ...
As sometimes I need to show alert user and asking him for inputs alert AlertInput got options for min/max and seems those working...
Read more >Ionic 3 Unable to fix maxlength for prompt input of alert controller
Im used my mobile application for ionic-3 I have some small issue, I want to set the max length ...
Read more >Ionic Unable to fix maxlength for prompt input of alert controller
Im used my mobile application for ionic-3 I have some small issue, I want to set the max length dynamically, I tried but...
Read more >ionic/docs/core.json - UNPKG
"text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which...
Read more >php javascript text input hide - You.com | The AI Search ...
JavaScript. You can filter the input values of a text <input> with the following setInputFilter function (supports Copy+Paste, Drag+Drop, keyboard shortcuts ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the feature request. This has been resolved via https://github.com/ionic-team/ionic/pull/21365 and will be available in an upcoming release of Ionic Framework. Thanks to @cerkiner for all the hard work in getting this feature done! 🎉
@liamdebeasi perhaps we can have a new generic “attr” option that can set custom attributes for inputs. For example like this: