Skip to main content
1 of 7

webform element validation custom module

i want to add a custom validation to text input, i followed the instruction provided in https://www.drupal.org/docs/8/modules/webform/webform-cookbook/how-to-add-custom-validation-to-a-webform-element

I have a requirement which needs to verify an id entered into a text box, by making an rest api call to another system, the issue is to make that rest api call, i need another text parameter which is also inputed into the webform. i have written a custom handler which makes that rest call, but that custom handler work on webform post save option only, how can i pass more than 2 fields to the validate function mentioned in the example given.