You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
340 B
11 lines
340 B
3 years ago
|
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 == "No"
|
||
|
record.errors.add :declaration, I18n.t("validations.declaration.missing")
|
||
|
end
|
||
|
end
|
||
|
end
|