ionic-framework
ionic-framework copied to clipboard
feat: Add 'required' property to ion-checkbox and ion-radio
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
When trying to set an ion-checkbox or ion-radio to 'required' I get "Property 'required' does not exist on type 'IonRadio & HTMLAttributes<HTMLIonRadioElement>'."
Describe the Use Case
I have checkboxes and radio buttons in my form which need to be validated on if they're checked.
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
<ion-radio name={name} disabled={disabled} id={inputId} ref={(el) => this.nativeInput = el} value={value} required={this.required} />
<ion-checkbox name={name} disabled={disabled} checked={checked} id={inputId} ref={(el) => this.nativeInput = el} value={value} required={this.required} />
Additional Information
No response
+1
Is there a workaround to setting an ion-checkbox to required?
news about this?
Would be a handy feature!