7 changed files with 14 additions and 16 deletions
@ -1,10 +0,0 @@ |
|||||||
module Validations::SubmissionValidations |
|
||||||
# Validations methods need to be called 'validate_<page_name>' to run on model save |
|
||||||
# or 'validate_' to run on submit as well |
|
||||||
|
|
||||||
def validate_declaration(record) |
|
||||||
if record.declaration&.zero? |
|
||||||
record.errors.add :declaration, I18n.t("validations.declaration.missing") |
|
||||||
end |
|
||||||
end |
|
||||||
end |
|
Loading…
Reference in new issue