diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 341a2c68c..d6a09a4f9 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -546,8 +546,14 @@ var descriptionValid = textValidator(ev, $descrTextarea, 0, <%= Constants::TEXT_MAX_LENGTH %>, false, $tinyMCEInput); var $table_names = $form.find(".table_name"); - var table_nameValid = textValidator(ev, $table_names, 1, - <%= Constants::NAME_MAX_LENGTH %>); + var table_nameValid; + if ($table_names.length > 0) // if table exists check its title, if not, its validated + { + table_nameValid = textValidator(ev, $table_names, 1, + <%= Constants::NAME_MAX_LENGTH %>); + }else{ + table_nameValid = true + } if (DragNDropSteps.filesStatus() && checklistsValid &&