protected function DateBase::setGnuDateInputFormatError in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/DateBase.php \Drupal\webform\Plugin\WebformElement\DateBase::setGnuDateInputFormatError()
Set GNU date input format error.
Parameters
array $element: The property element.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
1 call to DateBase::setGnuDateInputFormatError()
- DateBase::validateConfigurationForm in src/
Plugin/ WebformElement/ DateBase.php - Form validation handler.
File
- src/
Plugin/ WebformElement/ DateBase.php, line 434
Class
- DateBase
- Provides a base 'date' class.
Namespace
Drupal\webform\Plugin\WebformElementCode
protected function setGnuDateInputFormatError(array $element, FormStateInterface $form_state) {
$t_args = [
'@title' => $element['#title'] ?: $element['#key'],
];
$form_state
->setError($element, $this
->t('The @title could not be interpreted in <a href="https://www.gnu.org/software/tar/manual/html_chapter/tar_7.html#Date-input-formats">GNU Date Input Format</a>.', $t_args));
}