Same name in other branches
- 6.0.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfoValidate()
- 8.x-2.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfoValidate()
- 8.x-3.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfoValidate()
- 8.x-4.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::getFileInfoValidate()
Verify that the filename is correct.
Paramètres
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Fichier
-
src/
Form/ InfoForm.php, line 224
Classe
- InfoForm
- View AdvAgg information for this site.
Namespace
Drupal\advagg\FormCode
public function getFileInfoValidate(array $form, FormStateInterface $form_state) {
if (empty($form_state->getValue('filename'))) {
$form_state->setErrorByName('filename', $this->t('Please input a valid optimized filename.'));
}
}