custom error validations
This commit is contained in:
1 parent
dfd582d251
commit
95eec915c4
11 files changed
+79
-24
No files matched your search
@@ -3,4 +3,8 @@ class Answer < ApplicationRecord
|
||||
|
||||
belongs_to :question
|
||||
belongs_to :candidate
|
||||
|
||||
validates :candidate_id, presence: true
|
||||
validates :question_id, presence: true
|
||||
validates :answer, answer_format: true
|
||||
end
|
||||
Reference in new issue
Block a user