You are here

protected function DateBase::setInputFormatError in YAML Form 8

Set GNU 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::setInputFormatError()
DateBase::validateConfigurationForm in src/Plugin/YamlFormElement/DateBase.php
Form validation handler.

File

src/Plugin/YamlFormElement/DateBase.php, line 231

Class

DateBase
Provides a base 'date' class.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

protected function setInputFormatError(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));
}