Allows submitting values that are not in options

Created on 24 July 2024, 6 months ago
Updated 21 August 2024, 5 months ago

Problem/Motivation

Now when you submit a value that is not in options, will get a error in core/lib/Drupal/core/Form/FormValidator. at performRequiredValidation method.
elseif (!isset($options[$elements['#value']])) {
$message_arguments['%choice'] = $elements['#value'];
$form_state->setError($elements, $this->t('The submitted value %choice in the %name element is not allowed.', $message_arguments));
$this->logger->error('The submitted value %choice in the %name element is not allowed.', $message_arguments);
}

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇨🇳China m0925j

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

Comments & Activities

Production build 0.71.5 2024