material icon indicating copy to clipboard operation
material copied to clipboard

Required on mdSelect

Open tanwaniniranjan opened this issue 11 years ago • 10 comments

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

tanwaniniranjan avatar Feb 28 '15 19:02 tanwaniniranjan

I'll add some styling for ng-invalid.ng-dirty.

rschmukler avatar Mar 02 '15 16:03 rschmukler

Going to forward to the UX team to get some information about what it should look like, and when.

rschmukler avatar Mar 03 '15 17:03 rschmukler

@rschmukler does it even work? No one has commented otherwise on #1581.

ilanbiala avatar Mar 03 '15 21:03 ilanbiala

@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.

epelc avatar Mar 05 '15 16:03 epelc

wouldn't selecting a default value for md-select work, avoid using ng-required?

PrashantAshok avatar Mar 06 '15 00:03 PrashantAshok

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

kugler avatar Mar 12 '15 20:03 kugler

@rschmukler what about an red border-bottom, just like normal inputs/textareas?

gustavohenke avatar Mar 23 '15 17:03 gustavohenke

Merging this into #1843.

rschmukler avatar Mar 25 '15 16:03 rschmukler

adding required to <md-select required> isn't triggering form.$invalid for me when I submit the form.

ralyodio avatar May 25 '16 19:05 ralyodio

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.

warlyware avatar Jun 27 '16 17:06 warlyware