md-autocomplete does not work with ng-messages validation
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
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.
+1
+1
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.
Thanks for the quick turnaround, robert! When will this fix be live?
@robertmesserle Thanks for the quick fix. Hoping to get it live soon.
Hey @robertmesserle, any idea when this feature will be live?? thanks (:
Hey @robertmesserle , when will this be live?
Hey there, also would love to see this live. Any assumption? @robertmesserle
+1
+1
+1
+1
+1
+1
Using ng-form instead of form, ng-messages with autocomplete doesn't work
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
So use your ng-form nested into a form tag, and everything should works as expected.
This is still an issue where validations do not fire.
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
+1