Update validation for repository text field

This commit is contained in:
aignatov-bio 2020-01-09 13:32:03 +01:00
parent 54c78cf4d1
commit 9fdea4657c
2 changed files with 2 additions and 1 deletions

View file

@ -5,7 +5,7 @@ $.fn.dataTable.render.RowNameValidator = function($input) {
};
$.fn.dataTable.render.RepositoryTextValueValidator = function($input) {
return textValidator(undefined, $input, 1, GLOBAL_CONSTANTS.NAME_MAX_LENGTH);
return textValidator(undefined, $input, 0, GLOBAL_CONSTANTS.TEXT_MAX_LENGTH);
};
$.fn.dataTable.render.RepositoryListValueValidator = function() {

View file

@ -2,6 +2,7 @@ const GLOBAL_CONSTANTS = {
NAME_TRUNCATION_LENGTH: <%= Constants::NAME_TRUNCATION_LENGTH %>,
NAME_MAX_LENGTH: <%= Constants::NAME_MAX_LENGTH %>,
NAME_MIN_LENGTH: <%= Constants::NAME_MIN_LENGTH %>,
TEXT_MAX_LENGTH: <%= Constants::TEXT_MAX_LENGTH %>,
FILENAME_TRUNCATION_LENGTH: <%= Constants::FILENAME_TRUNCATION_LENGTH %>,
FILE_MAX_SIZE_MB: <%= Rails.configuration.x.file_max_size_mb %>,
IS_SAFARI: /^((?!chrome|android).)*safari/i.test(navigator.userAgent),