Material: mdSelect and mdInputContainer for ngMessages

Created on 9 Mar 2015  路  7Comments  路  Source: angular/material

In order to group ngMessages with mdSelect, there needs to be a container element. Should mdInputContainer be used for this? It seems to display fine, but the docs do not use it as an example.

docs

Most helpful comment

Thanks for the fix, @rschmukler. However, the "invalid and dirty" requirement seems inconsistent with the handling of input, for which the invalid style is applied on blur, regardless of a value change (ng-dirty). For example, tabbing through a form without changing any values results in error-styled inputs but not mdSelects.

All 7 comments

@breandr could you give a demo of this with a plunker? Depending on how it looks we might add it to the docs as a good example?

http://plnkr.co/edit/dTanrH7Qf4SBNYRKJQHM?p=preview

Unfortunately there is no css for the invalid color

@rschmukler Please add a demo for validation along with this.

My plunker includes validation

Thanks for the fix, @rschmukler. However, the "invalid and dirty" requirement seems inconsistent with the handling of input, for which the invalid style is applied on blur, regardless of a value change (ng-dirty). For example, tabbing through a form without changing any values results in error-styled inputs but not mdSelects.

The problem here is that an invalid ie, un-select box doesn't prevent form submission.

Hello @ngraef i am currently having the same issue, i have a md-select field the is is required and is using an ng-message, if i select an option in the select it triggers the error styling. Any suggestion on this? Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikhildev picture nikhildev  路  3Comments

epelc picture epelc  路  3Comments

LeoLozes picture LeoLozes  路  3Comments

PeerInfinity picture PeerInfinity  路  3Comments

ddimitrop picture ddimitrop  路  3Comments