Form validation exception when using {% ajaxPartial %}


I have a module that provide a component that submit a form (newsletter system). This module works well when putting the component to a page or layout and customizing the partial.

I wanted to try the new {% ajaxPartial %} feature to include the component inside the partial that use it. But I get an error with validation :


When I put the component to the parent page, it works well, my error is nicely display in the data-validate-for div that is placed below the field. But with ajaxPartial, get an hugly js error popup instead.

Here is the code of the partial :

    <form data-request="signupForm::onSignup" data-request-update="{ _self: true }" data-request-validate>
        <div class="field field-text">
            <label for="newsletter-email">{{ 'Email address'|_ }}</label>
            <input id="newsletter-email" name="email" type="text" />
            <div data-validate-for="email"></div>
        <div class="field submit">
            <button class="btn btn-secondary" type="submit">{{ 'Subscribe'|_ }}</button>

Did I miss something, or does partial doesn’t support validation ?

Looks like a bug, for sure. It looks like the exception is not being caught correctly. We have this on our internal tracker to look at soon.

This should be fixed when v3.3.4 is released.

@daft Thank you, can’t wait to test that