Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/utils/forms.js')
-rw-r--r--app/assets/javascripts/lib/utils/forms.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/forms.js b/app/assets/javascripts/lib/utils/forms.js
index b58aef15dda..1d8c6ee23fc 100644
--- a/app/assets/javascripts/lib/utils/forms.js
+++ b/app/assets/javascripts/lib/utils/forms.js
@@ -119,12 +119,14 @@ export const parseRailsFormFields = (mountEl) => {
}
const fieldNameCamelCase = convertToCamelCase(fieldName);
- const { id, placeholder, name, value, type, checked } = input;
+ const { id, placeholder, name, value, type, checked, maxLength, pattern } = input;
const attributes = {
name,
id,
value,
...(placeholder && { placeholder }),
+ ...(input.hasAttribute('maxlength') && { maxLength }),
+ ...(pattern && { pattern }),
};
// Store radio buttons and checkboxes as an array so they can be