-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation Errors not showing for sub schemas #359
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been trying to figure out why validation errors are not shown reactively (they are detected) and I think the error is coming from simple schema's tracker integration with autoform. This is from a debugging session and I've not been able to verify by running a local copy so apologies if it's incorrect.
As a simple example, consider:
Assuming
mainSchema
is the schema on the form butbar
is empty,bar
should set the classhas-error
and set thehelp-block
. The problem I believe is that the code inValidationContext
does not trigger the tracker dependency to change.ValidationContext._schemaKeys = ["foo"];
So when markKeyChanged is called with "foo.bar" , hasOwnProperty will return false and not trigger a change.
This is the code:
I'd create a PR but I'm strugling to actually install a local version of simpl-schema to be able to test my change first.
--------Edit---------
So from some local testing it appears the issue is more to do with adding the tracker dependency for each sub schema key so that later marKeyChanged can find it. I have a fix created and will try get a PR created.
The text was updated successfully, but these errors were encountered: