mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
fixed error message duplication
This commit is contained in:
parent
b44a284b54
commit
b672d85405
|
@ -93,12 +93,16 @@
|
|||
}
|
||||
})
|
||||
.on('submit', function(ev) {
|
||||
textValidator(ev, element.find("#experiment-name"), false);
|
||||
textValidator(ev, element.find("#experiment-description"), true);
|
||||
})
|
||||
.clearFormErrors();
|
||||
form.clearFormErrors();
|
||||
});
|
||||
|
||||
$("#new-experiment-modal").on("hidden.bs.modal", function (){
|
||||
form.clearFormErrors();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize no description edit link
|
||||
function initEditNoDescription(){
|
||||
var modal = "#edit-experiment-modal-";
|
||||
|
|
|
@ -21,7 +21,7 @@ class Experiment < ActiveRecord::Base
|
|||
presence: true,
|
||||
length: { minimum: 4, maximum: 50 },
|
||||
uniqueness: { scope: :project, case_sensitive: false }
|
||||
validates :description, length: { maximum: 255 }
|
||||
validates :description, length: { maximum: 50 }
|
||||
validates :project, presence: true
|
||||
validates :created_by, presence: true
|
||||
validates :last_modified_by, presence: true
|
||||
|
|
Loading…
Reference in a new issue