public function OrderForm::validate in Ubercart 8.4
File
- uc_order/
src/ OrderForm.php, line 97
Class
- OrderForm
- Form controller for the Ubercart order form.
Namespace
Drupal\uc_orderCode
public function validate(array $form, FormStateInterface $form_state) {
$order = $this
->buildEntity($form, $form_state);
if ($form_state
->getValue('order_modified') != $order
->getChangedTime()) {
$form_state
->setErrorByName('order_modified', $this
->t('This order has been modified by another user, changes cannot be saved.'));
}
parent::validate($form, $form_state);
}