-
Notifications
You must be signed in to change notification settings - Fork 647
Broadcast schemaForm.error for a specific form #655
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
Comments
I personally do have a different controller per form. With Angular 2 and the shift to components this is likely to be even more common I would expect. However I will keep it in mind when we start refactoring the validations into their own component/repo. |
@Anthropic thanks. Could you give me a hint what/where to modify so I will start doing it by myself? About the discussion on Angular 2, isn't it the other way around? They are trying to get rid of controllers, and adding a controller for each form doesn't seem to be ideal. Also, I guess one of the reasons to use schema-form is to avoid code repetition in html templates and DOM elements. Let's say I have a list of forms that is coming from the server so I don't know in advance how many forms I have to create. I would use an ng-repeat:
attaching the right controller for the right form could be kind of tricky. |
* feature-655: Pass optional form name when broadcast error (json-schema-form#655)
I provided a PR if interested #656 |
@LeonardoGentile thanks for that, I will take a look this week, I am not doing the release this weekend as I need some questions answered first from the lead developer who is a notoriously busy man in demand, so plenty of time for this to make it in :) |
Released as part of 0.8.13 |
Similar to #589 broadcast an
schemaForm.error.name
could not be enough when we have multiple forms. One solution could be to create multiple controllers (one for form) but IMO is not the best solution.Any plan to pass the form name on broadcast in order to Inject the right errors in the right form?
If not, any hint about a possible solution?
The text was updated successfully, but these errors were encountered: