diff --git a/core/src/components/radio-group/radio-group.tsx b/core/src/components/radio-group/radio-group.tsx index a8762b5f8a..e54477d88c 100644 --- a/core/src/components/radio-group/radio-group.tsx +++ b/core/src/components/radio-group/radio-group.tsx @@ -34,6 +34,11 @@ export class RadioGroup implements ComponentInterface { */ @Prop() name: string = this.inputId; + /** + * If `true`, the user must fill in a value before submitting a form. + */ + @Prop() required = false; + /** * the value of the radio group. */ @@ -225,12 +230,12 @@ export class RadioGroup implements ComponentInterface { } render() { - const { label, labelId, el, name, value } = this; + const { label, labelId, el, name, value, required } = this; const mode = getIonMode(this); renderHiddenInput(true, el, name, value, false); - return ; + return ; } }