Open hugobessa opened 8 years ago
I tested it with examples, but didn't create automated tests yet. I would appreciate if anybody could help me with that, I'm not used to frontend testing.
+1
+1
As I said, I only tested manually, but not atomatically because I was not familiar with jasmine. I'm implementing the feat #57 in my fork, then I'll try to make the tests for both features now.
+1, would love if this could be merged 😄
Hey, is there any update for this?
Is the holdup the missing jasmine tests?
Changes: feat, docs Scope: valdrFormItem-directive, valdr-service Subject: Implementing cross model validation
Description
Implements the possibility of creating custom validation using other models in the form as parameters.
The user will define the required models in a requireModels contraint in the custom validator, which receives a list of field names. It will allow him to receive a third parameter in the validate function of its custom validator with the model values required in the requreModels constraint.
eg.:
It uses the parent form to find the model values and force revalidation of dependent fields after a dependency model changes, and passes the dependency model value as parameters in the custom validator.
Changes per component: