diff --git a/backup/restorefile_form.php b/backup/restorefile_form.php index f903415745b13..eec70f9f73f5b 100644 --- a/backup/restorefile_form.php +++ b/backup/restorefile_form.php @@ -30,6 +30,7 @@ function definition() { $mform->addElement('hidden', 'contextid', $contextid); $mform->setType('contextid', PARAM_INT); $mform->addElement('filepicker', 'backupfile', get_string('files')); + $mform->addRule('backupfile', get_string('required'), 'required'); $submit_string = get_string('restore'); $this->add_action_buttons(false, $submit_string); }