Skip to content

Commit

Permalink
MDL-80498 group: Added required rule for filepicker field
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshndev committed Jan 12, 2024
1 parent 287cfcb commit 8267670
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions group/import_form.php
Expand Up @@ -53,6 +53,7 @@ function definition() {
$filepickeroptions['filetypes'] = '*';
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
$mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
$mform->addRule('userfile', null, 'required');

$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
Expand Down

0 comments on commit 8267670

Please sign in to comment.