Required on mdSelect is not as clear as it is for the rest of the fields, so the user does not get to know why his sublit button is still disabled
I'll add some styling for ng-invalid.ng-dirty
.
Going to forward to the UX team to get some information about what it should look like, and when.
@rschmukler does it even work? No one has commented otherwise on #1581.
@ilanbiala It doesn't work for me on 0.8.3
Perhaps a quick fix for now would be to add a hidden form element in md-select
which has the current value. I've tested this a little bit and it appears to work if you set opacity: 0
and position it correctly. But I think @marcysutton will scream accessibility. So I hope a real fix can come soon.
wouldn't selecting a default value for md-select work, avoid using ng-required?
More than ng-invalid styling is needed. For the use of ng-messages I think it should have a container similar to md-input-container. This is also in concordance with the discussion in #1586
@rschmukler what about an red border-bottom, just like normal inputs/textareas?
Merging this into #1843.
adding required to <md-select required>
isn't triggering form.$invalid
for me when I submit the form.
Like @chovy, I'm also not able to get <md-select>
to properly validate. I've tried adding required
, required=""
and ng-required
, but inspecting the empty <md-select>
element in dev tools shows it has classes ng-pristine ng-untouched ng-valid ng-scope ng-empty ng-valid-required
and the ng-disabled
on the submit button is never fired.
Most helpful comment
adding required to
<md-select required>
isn't triggeringform.$invalid
for me when I submit the form.