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

RC4: ng-messages isn't shown when form is submitted, but input is untouched #5752

Closed
chr22 opened this issue Nov 16, 2015 · 3 comments
Closed
Assignees
Labels
pr: merge ready This PR is ready for a caretaker to review
Milestone

Comments

@chr22
Copy link

chr22 commented Nov 16, 2015

Try and push the submit button in this CodePen and see that the message is set into DOM but its opacity is 0.

It will need something along the lines of:

form.ng-submitted [ng-messages] {
    opacity: 1;
}
@chr22 chr22 changed the title RC4: ng-messages isn't shown when submitted RC4: ng-messages isn't shown when form is submitted, but input is untouched Nov 16, 2015
@michaelkrone
Copy link

The behaviour of showing the error messages changed silently: Compare the "Errors" section on 0.11.4 with 1.0.0-rc4.
Now it seems to be aligned with the attribute description of the md-is-error attribute on the md-input-container API page.

However there has not been any hint in the changelog. This was discussed several times I think, so is this an Issue or a fix?

@datak1d
Copy link

datak1d commented Nov 20, 2015

+1 for this

Can anyone provide a working example of how md-input-container now works with ng-messages?

@chronixlo
Copy link

You can use md-is-error on the md-input-container as such:

md-is-error="userForm.$submitted && userForm.area.$invalid"

@ThomasBurleson ThomasBurleson added this to the 1.0-rc7 milestone Dec 4, 2015
EladBezalel added a commit that referenced this issue Dec 4, 2015
Added check for parent form `$submitted` attribute.

Notice that `novalidate` attribute should be applied on parent form in order to make it work (Browser preventing submit when not specified)

fixes #5752
@EladBezalel EladBezalel added the pr: merge ready This PR is ready for a caretaker to review label Dec 4, 2015
EladBezalel added a commit that referenced this issue Dec 8, 2015
Added check for parent form `$submitted` attribute.

Notice that `novalidate` attribute should be applied on parent form in order to make it work (Browser preventing submit when not specified)

fixes #5752
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants