Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

md-autocomplete does not work with ng-messages validation #3401

Closed
MetalHexx opened this issue Jun 22, 2015 · 27 comments
Closed

md-autocomplete does not work with ng-messages validation #3401

MetalHexx opened this issue Jun 22, 2015 · 27 comments

Comments

@MetalHexx
Copy link

As per issue #1780, ng-messages still fails to fire on md-autocomplete directives.

I've tried using the "name", "input-name", and "md-input-name" attribute on the md-autocomplete element and of course added a required attribute.

After trying to submit the form to save, the md-autocomplete form element does not show up as member on the $scope.form object. Oddly enough, the $scope.form.$valid == false if you check it. It just doesn't render the ng-message.

The code pen linked off the autocomplete demo site also does not work. I had to save it to share it:
http://codepen.io/MetalHexx/pen/qdVBLa

@MetalHexx
Copy link
Author

For those who still want to use the autocomplete control bundled with angular-material, You can add an input element below the autocomplete and add an ng-hide="true" to hide the control. The ng-message will still render and appear to refer to the md-autocomplete control.

@caok2709
Copy link

+1

1 similar comment
@vicky-gonsalves
Copy link

+1

@robertmesserle
Copy link
Contributor

Sorry guys, this was broken right before I was out for a little over a week and went entirely too long without being addressed. Fixing this now.

@MetalHexx
Copy link
Author

Thanks for the quick turnaround, robert! When will this fix be live?

@vicky-gonsalves
Copy link

@robertmesserle Thanks for the quick fix. Hoping to get it live soon.

@prxg22
Copy link

prxg22 commented Aug 10, 2015

Hey @robertmesserle, any idea when this feature will be live?? thanks (:

@ryananthonydrake
Copy link

Hey @robertmesserle , when will this be live?

@czery
Copy link

czery commented Feb 18, 2016

Hey there, also would love to see this live. Any assumption? @robertmesserle

@SelmanAY
Copy link

SelmanAY commented Mar 8, 2016

+1

5 similar comments
@eniniz
Copy link

eniniz commented Mar 23, 2016

+1

@ringil-21
Copy link

+1

@jojogeyer
Copy link

+1

@ghost
Copy link

ghost commented Mar 23, 2016

+1

@shrutiaggarwal3012
Copy link

+1

@piyushchauhan2011
Copy link

Using ng-form instead of form, ng-messages with autocomplete doesn't work

@ringil-21
Copy link

Hi @piyushchauhan2011 ,

The ng-form directive is not a replacement for the form tag. In the docs they say:

The purpose of ngForm is to group controls, but not to be a replacement for the

tag with all of its capabilities (e.g. posting to the server, ...).

So use your ng-form nested into a form tag, and everything should works as expected.

@ryananthonydrake
Copy link

This is still an issue where validations do not fire.

@sebasecheverry
Copy link

The issue still presents in the actual version, I'm using version v1.0.6, but it does'nt work correctly for md-select as it doesn't shows the redline. But actual version does show it for md-select.

however is not working correctly for autocomplete

@stephengardner
Copy link

+1

5 similar comments
@tom94zoe
Copy link

tom94zoe commented Jun 7, 2016

+1

@che85
Copy link

che85 commented Jun 14, 2016

+1

@nghilevi
Copy link

+1

@alegadpen
Copy link

+1

@Jpatrick2zo
Copy link

+1

@ThomasBurleson
Copy link
Contributor

Based on community votes: re-opening.

@topherfangio
Copy link
Contributor

Closing as duplicate of #9468. Discussing with @crisbeto on who will own.

@Splaktar Splaktar modified the milestones: 1.1.3, 1.1.2 Jul 21, 2018
@angular angular locked as resolved and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests