I am creating a custom address component. Once I have data for multiple fields, I would like to call a validation Dynamic Data Service.
My first issue is how to trigger the "Valid after change if" rule based on input from multiple fields?
You can place a validation rule on the container (block) that contains the input fields. I believe this validation rule will be called when you try to navigate to the next page.
If you wanted to fire the validation on the block earlier you could call the Form.validate function from your Valid after change if rule in your fields:
Form.validate("addressBlock", data, null);
Hey Adam, did you get this working?
I have the same issue but on a single field. My simple data call is in the "Valid after change if" rule. It returns a true/false and I want to trigger a validation message when it is false. Is there a way to throw a validation error or a suggested approach?
Instead of returning true/false, just return the validation message.