material icon indicating copy to clipboard operation
material copied to clipboard

md-autocomplete 'required' validation broken in 1.0.1

Open tecklund opened this issue 10 years ago • 14 comments

The Floating Label Autocomplete demo is broken in versions 1.0.0, 1.0.1 and HEAD, although it was working in 0.11.4. Leaving the field empty does not cause the form to have the 'required' error.

Other validations (min, max) seem to be working.

tecklund avatar Dec 18 '15 18:12 tecklund

Related to #6313.

topherfangio avatar Dec 18 '15 18:12 topherfangio

@topherfangio Any one working on this?

Nazanin1369 avatar Dec 19 '15 18:12 Nazanin1369

It should work if you put required="true"

bOOm-X avatar Dec 21 '15 15:12 bOOm-X

it looks like required="true" does work

tecklund avatar Dec 21 '15 19:12 tecklund

Yes it does ! It is a small bug in the parsing of the required attribute. I will do a merge request as soon as I can (tomorrow Paris time)

bOOm-X avatar Dec 21 '15 19:12 bOOm-X

Thank you!

tecklund avatar Dec 21 '15 19:12 tecklund

Ok great! Thanks

91K00 avatar Jan 08 '16 11:01 91K00

seems like required="true" makes sense but ng-messages still not working

manasovdan avatar Jan 22 '16 10:01 manasovdan

i installed bower component "angular-material": "1.0.6" but i feel the issue #6393 still exist. image

MasterRam avatar Mar 29 '16 12:03 MasterRam

@MasterRam The fix has been released in 1.1.0-rc1, not in v1.0.6

devversion avatar Mar 29 '16 13:03 devversion

+1

kevinlbatchelor avatar Apr 03 '16 01:04 kevinlbatchelor

Thanks It is working fine....:) On Apr 3, 2016 6:54 AM, "kevinlbatchelor" [email protected] wrote:

+1

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

MasterRam avatar Apr 03 '16 02:04 MasterRam

I am using angular material 1.1.1. I am not able to get my required autocomplete to work. The form does not submit, to the required attribute is working but the ng-message never shows. Gist I have tried all above suggestions ...

So after reviewing #1780 and @91K00 code it appears that the required only 'works' (meaning displays) when the <md-autocomplete> is wrapped with <md-input-container>, this does not match the documentation. I am also not a huge fan of the moving floating label. Can we fix the required to display when NOT using the <md-input-container> wrapper. Thanks

jonathanread avatar Jan 03 '17 15:01 jonathanread

I'm observing the same exact issue as @jonathanread : In 1.1.1 the md-autocomplete does not work using 'md-required' or 'required' tags. This is inconsistent with other elements and the documentation.

Karasuni avatar Feb 01 '17 10:02 Karasuni