summaryrefslogtreecommitdiff
path: root/app/models/ml/candidate_param.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ml/candidate_param.rb')
-rw-r--r--app/models/ml/candidate_param.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ml/candidate_param.rb b/app/models/ml/candidate_param.rb
index cbdddcc8a1a..a259e059379 100644
--- a/app/models/ml/candidate_param.rb
+++ b/app/models/ml/candidate_param.rb
@@ -3,6 +3,7 @@
module Ml
class CandidateParam < ApplicationRecord
validates :candidate, presence: true
+ validates :name, uniqueness: { scope: :candidate }
validates :name, :value, length: { maximum: 250 }, presence: true
belongs_to :candidate, class_name: 'Ml::Candidate'