ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat: Add 'required' property to ion-checkbox and ion-radio

Open t0byman opened this issue 3 years ago • 4 comments

Prerequisites

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

t0byman avatar Apr 22 '22 12:04 t0byman

+1

SuperSchek avatar Apr 22 '22 12:04 SuperSchek

Is there a workaround to setting an ion-checkbox to required?

jasondavey avatar Feb 28 '23 14:02 jasondavey

news about this?

JEricaM avatar Jan 02 '24 15:01 JEricaM

Would be a handy feature!

chester-sykes avatar Feb 11 '24 14:02 chester-sykes