ionic-framework
ionic-framework copied to clipboard
feat: select, add errorText and helperText props
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
ion-select needs the errorText attribute to display e.g. if I want to make the selection mandatory.
Please add this or provide a proper workaround to display an error message below the ion-select
Describe the Use Case
When I use Angular FormControls, I can smoothly add errorText to Input etc. to display that something is wrong while validating the form.
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
Thank you for submitting the feature request!
The team would like to move forward by adding an error text and helper text props to select. We were able to confirm that MD adds these through their documentation.
Is this resolved until now? If not, how to cover errors?
Once the feature is added, we will update this issue to inform everyone. I recommend keeping an eye on it. In the meantime, you can use the ion-note component as a workaround to mimic the functionality of errorText and helperText:
<ion-select label="Default label" placeholder="Favorite Fruit">
<ion-select-option value="apple">Apple</ion-select-option>
<ion-select-option value="banana">Banana</ion-select-option>
<ion-select-option value="orange">Orange</ion-select-option>
</ion-select>
<ion-note>Please select your favorite fruit</ion-note>