Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdForm mdInputContainer showing errorsmsgs before entering form #1266

Closed
SanderElias opened this issue Jan 23, 2015 · 3 comments
Closed

mdForm mdInputContainer showing errorsmsgs before entering form #1266

SanderElias opened this issue Jan 23, 2015 · 3 comments
Milestone

Comments

@SanderElias
Copy link
Contributor

I created this sample on plunker to demonstrate a few issues I'm having with forms.

This is the first one, if I enter the page, before doing anything, the error-messages are displayed as you can see in the below picture.
image showing issue

In my eyes this is wrong on multiple levels.

  1. Error's should only be visible after user interaction
  2. they should not appear in different formats (black/red)
@ThomasBurleson ThomasBurleson added this to the 0.8.0 milestone Jan 23, 2015
@Frank3K
Copy link
Contributor

Frank3K commented Jan 23, 2015

Isn't (1) standard behavior? I always wrap ng-messages in an ng-if $dirty check. See: http://stackoverflow.com/questions/25634394

@ajoslin
Copy link
Contributor

ajoslin commented Jan 27, 2015

  1. Customize your ng-messages as you see fit.
  2. c3cad66

@ajoslin ajoslin closed this as completed Jan 27, 2015
@SanderElias
Copy link
Contributor Author

@ajoslin If you open my plunk, You will see that the error messages are still off. I can add an
ng-show='form.field.$dirty' to hide the errors, to take care of this.
However, they still are appearing in 2 different styles, although now I seem to be able to control when the styling takes place, I can not easily prevent them appearing them in different styles.

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

4 participants