Cart items getting processed even when validation fails

Created on 12 June 2024, 5 months ago
Updated 5 September 2024, 3 months ago

Problem/Motivation

For CartForm, the #submit callback is getting triggered even when the form validation error occurs.

Steps to reproduce

1. Go to the entity content translate form.
2. Click on "Add to cart" button
3. On the "Cart" page, keep the "target language" field or the Translator" field empty.
4. Click on the "Request multiple translations" button.

Proposed resolution

In function tmgmt_xtm_cart_source_overview_validate

Replace \Drupal::messenger()->addMessage(

with

$form_state->setErrorbyName()

🐛 Bug report
Status

Needs review

Version

6.0

Component

Code

Created by

🇮🇳India gaurav_manerkar Vasco Da Gama, Goa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024