Ion-select does not respect required attribute

Hello there,

I’m working on an ionic2 app. and I’m using really basic validation to disable the submit buttons in my forms.

f/e this would work:

<ion-content>
    <form #frm="ngForm">
        <ion-input required>
        <button [disabled]="!frm.valid">
       </form>
< /ion-content>

Replacing the input with a select or radio button however, won’t work (in my code the select would be like this):

        <ion-item>
            <ion-label>some label</ion-label>
            <ion-select required >
                <ion-option *ngFor="#option of selectOptions" value="{{option.id}}">{{option.name}}</ion-option>
            </ion-select>
        </ion-item>

is this;
a - Not supported
b - Not yet supported
c - Incorrectly Implemented by me?

I actually still have this question

I’m having this issue. Any answers?

Not sure right now but I believe I explicitly checked if it’s selected (checking value in component) It sucks but it works

I also have this issue, any news ?

i also facing this issue any updates?

As I replied before I’m still checking the dirty way.

I think it might be useful to look into model driven forms, not sure if that will cover it but I think it will.

Not sure if it is still relevant, but if you add the ngModel attribute the required attribute is handled as expected.

1 Like

No its not. If you dont select anythig from the list and click ‘Ok’, the selected value still will be empty but required will not be triggered.

Thanks. It works for me

Have you solved this issue?

change <ion-select required> to <ion-select aria-required="required">