function FileRequiredTestForm::buildForm
Overrides FileTestForm::buildForm
File
- 
              core/
modules/ file/ tests/ file_test/ src/ Form/ FileRequiredTestForm.php, line 22  
Class
- FileRequiredTestForm
 - File required test form class.
 
Namespace
Drupal\file_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $form['file_test_upload']['#required'] = TRUE;
  return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.