mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-18 22:58:53 +08:00
Update validation for repository text field
This commit is contained in:
parent
54c78cf4d1
commit
9fdea4657c
2 changed files with 2 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ $.fn.dataTable.render.RowNameValidator = function($input) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.dataTable.render.RepositoryTextValueValidator = 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() {
|
$.fn.dataTable.render.RepositoryListValueValidator = function() {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ const GLOBAL_CONSTANTS = {
|
||||||
NAME_TRUNCATION_LENGTH: <%= Constants::NAME_TRUNCATION_LENGTH %>,
|
NAME_TRUNCATION_LENGTH: <%= Constants::NAME_TRUNCATION_LENGTH %>,
|
||||||
NAME_MAX_LENGTH: <%= Constants::NAME_MAX_LENGTH %>,
|
NAME_MAX_LENGTH: <%= Constants::NAME_MAX_LENGTH %>,
|
||||||
NAME_MIN_LENGTH: <%= Constants::NAME_MIN_LENGTH %>,
|
NAME_MIN_LENGTH: <%= Constants::NAME_MIN_LENGTH %>,
|
||||||
|
TEXT_MAX_LENGTH: <%= Constants::TEXT_MAX_LENGTH %>,
|
||||||
FILENAME_TRUNCATION_LENGTH: <%= Constants::FILENAME_TRUNCATION_LENGTH %>,
|
FILENAME_TRUNCATION_LENGTH: <%= Constants::FILENAME_TRUNCATION_LENGTH %>,
|
||||||
FILE_MAX_SIZE_MB: <%= Rails.configuration.x.file_max_size_mb %>,
|
FILE_MAX_SIZE_MB: <%= Rails.configuration.x.file_max_size_mb %>,
|
||||||
IS_SAFARI: /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
|
IS_SAFARI: /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue