Closed christianalfoni closed 8 years ago
Is there anyway the debugger can put some more information about the field when it gets into the debugger?
eg. fieldChanged - simple.email.value (10) (sync)
Hold on with the merge, have a couple of things to fix :)
@schotime More info in what way? :)
@christianalfoni Just to maybe display the form that the signal belongs to in this case.
@schotime Ah I see... well, the signal does not really belong to a specific form. It is just a signal registered on the forms
module to do changes to whatever fields wherever in your state tree, based on the payload you give it :) So the state changes there and the input is the only details we have on what it does, the signal itself is completely generic.
But new docs all this becomes much clearer.
Okay, so I got inspired and did a complete refactor of Forms. Instead of explaining what I removed, I will rather explain now how it works. I have also rewritten the docs for the website (released soon), so they just need some tweaking after this pull gets merged.
fieldChanged
that can be used for auto-validationNOTE! No more preventValidation here, it is just a default signal for common use case. Look further
This gives you complete control of how validation should work and you can easily create a chain factory to do validation the way you want to.
This pull has breaking changes and requires a new version, but now I feel that everything is under control and a lot more composeable