Access field errors from parent
See original GitHub issueContinued from: http://stackoverflow.com/questions/42145302/promote-a-field-error-to-a-form-error?noredirect=1#comment71566856_42145302
Sometimes, errors cannot be DOM children of input fields. A common example is when an error must be displayed above the entire form because there is no space to put the error in the DOM as a peer or child. To achieve this, knowing whether the field has been touched
is also required by the parent. While this is achievable in a lengthly mapStateToProps
, I propose we offer a helper pattern to make this simpler.
Alternatively, we could create a dummy node & create a portal to it from the child, but then the developer loses functionality of how to show the errors (since it would always be last rendered).
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Method 'Parent' of object failed - ms access - Stack Overflow
1 Answer 1 · Make sure there are no special characters in your forms' names · Compact and repair · Create a new...
Read more >Parent.error? - Power Platform Community - Microsoft
The default error message that is auto-generated when creating a PowerApp from a Sharepoint form has its Text property set to parent.error.
Read more >Parent form shows "#Error" in total if subform has no records
Hi everyone, I've got a grand total field on a parent form that adds the value of two summary fields that are located...
Read more >Microsoft Access: Check if Form Object is a Subform
How do you check if the form object is a subform in Access without triggering a runtime error? Hint: this is a trick...
Read more >Insufficient Access on Cross Entity Error when creating a child ...
Lookup to OpportunityTeamMember (OpptyTeam: OWD-Controlled by Parent, has field Master to Account). Receiving the error above when creating the ...
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
Yes, that addition sounds reasonable. The anytouched does work because, for example, imagine a credit card form with a number and expiry field. Both have an error because they’re null. After I enter a valid number, then the number is touched with no error but expiry has an error but is not touched. I want the form error to be blank in this case because everything that has been touched has no error.
On Feb 13, 2017 1:16 PM, “Erik Rasmussen” notifications@github.com wrote:
Do you only want to display the error of the touched field(s)? Or would the
anyTouched
prop help?If you want to limit it to only touched fields, then it sounds like you are requesting some sort of
getTouchedFields(state)
selector that returns an array of field names that you could combine with the existinggetFormSyncErrors(state)
selector.