I have a webform created in Drupal 8 using the webform module I have to submit the data to 2 different 3rd party API.
The scenario is I have to submit the data to the 1st API if there is no error response found then submit the data to 2nd API so now I have created a submit handler and attached the handler to the webform. Now the issue is when I got an error response message while submitting the data to 1st API and showing the message using
drupal_set_message() function everything is working fine but the form validation js not loading at this point.
The used code is like the below:
drupal_set_message(t($msg), 'error'); $form_state->setRebuild(true);
can anybody help me with this?