Allow SelectWithInput to be marked as required and handle that dynamically
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLSelectAndOtherField.php
index 85cbbb1..354432b 100644 (file)
@@ -130,6 +130,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
                        'textinput' => $textAttribs,
                        'dropdowninput' => $dropdownInputAttribs,
                        'or' => false,
+                       'required' => $this->mParams[ 'required' ] ?? false,
                        'classes' => [ 'mw-htmlform-select-and-other-field' ],
                        'data' => [
                                'maxlengthUnit' => $this->mParams['maxlength-unit'] ?? 'bytes'