1
0
-1

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?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hey Adam,

      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);
      1. Ben Warner

        Hey Adam, did you get this working?

      2. Gary Thain

        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? 

      3. Ben Warner

        Instead of returning true/false, just return the validation message.

      CommentAdd your comment...