feature: support form errors (see issue #15)#18
Open
bkinsey808 wants to merge 1 commit intoultimatecourses:masterfrom
Open
feature: support form errors (see issue #15)#18bkinsey808 wants to merge 1 commit intoultimatecourses:masterfrom
bkinsey808 wants to merge 1 commit intoultimatecourses:masterfrom
Conversation
|
@toddmotto can you check this PR? |
Member
|
We'll get this baked into a future addition of ngxErrors - planning to enhance some of the internals and there's a few things in here which work but what I'd like to do is introduce this feature once we've re-shapen the internals. This will make things a little smoother as there's a few hacks in here to get things to work - we'll add :) |
|
@toddmotto thanks |
|
Also looking forward to this feature. |
|
Hello @toddmotto would love to know if you've got a timeline for this? |
|
@toddmotto any news? |
|
this looks interesting! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are you adding/fixing?
I love the syntax of ngxErrors so much, that I wanted to use it not just for form control errors, but for form errors itself. See issue #15
Have you added tests for your changes?
I'm sorry, I did not. But the existing tests still passed.
Will this need documentation changes?
Yes, I imagine this feature is something ppl would want to know about.
Does this introduce a breaking change?
I don't think so. As far as I can tell, all existing functionality still remains.
Other information
This code is a bit ugly, not super DRY. I sort of intended it as a proof of concept. It could be cleaned up and refactored, maybe we need a concept of a single object that can be either a form control or a form group. I'm especially displeased with having to call
detectChanges()but I haven't found a way around it for OnPush change detection strategy. If anybody knows how to avoid it, pls let me know, I want to learn.Thanks @toddmotto for a great project!