Allow to customize when md-error is shown
See original GitHub issueBug, feature request, or proposal:
Feature request
What is the expected behavior?
I would like to be able to customize when the md-error directive is visible.
E.g. when ctrl.dirty && ctrl.invalid
.
What is the current behavior?
As per #3560 my understanding is that the md-error is only shown when the control is: (isInvalid && (isTouched || isSubmitted))
What are the steps to reproduce?
See my Plunker.
- Name1 is using md-error. Error will only show after control been touched.
- Name2 is using an old workaround with md-hint. It can show error directly when dirty.
What is the use-case or motivation for changing an existing behavior?
For 99% of the time I believe the current implementation is the best behavior.
However, for special cases, you will need to be able to modify when errors are shown. For example instantly as the example from the Angular documentation.
Which versions of Angular, Material, OS, browsers are affected?
Angular v4.0.3 Material v2.0.0-beta.3
Is there anything else we should know?
I assume my request is not currently possible as my question on StackOverflow did not get any suggested answers.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
The Mirror Column - monday.com Support
Customize your Mirror Column. When mirroring a column you can customize the way that it is displayed on the board where it will...
Read more >Guide to Mirror Settings - Apache Maven
To configure a mirror of a given repository, you provide it in your settings file ( ${user.home}/.m2/settings.xml ), giving the new repository its...
Read more >Mirror / CustomReflectable / CustomLeafReflectable - NSHipster
You can customize how instances of a type are reflected by adopting the CustomReflectable protocol and implementing the required customMirror ...
Read more >Turn off Mirror my video in Microsoft Teams meetings to match ...
Meeting participants now have the option to stop mirroring the image of their video preview—the small preview window that allows you to see...
Read more >Customise your Raspberry Pi magic mirror with modules
This controls where the module is displayed on the mirror. If a title is required, then 'title' allows you to change the text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Instead of configuring the whole behaviour to trigger a special case, you could simply do this:
for the control in question. This at least is what I do in such cases.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.