Skip to content
Snippets Groups Projects

Set a limit of 255 characters for security policy names

Merged Sam White requested to merge sam-add-fullname-approval-rule into master
1 unresolved thread
Compare and Show latest version
2 files
+ 1
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -25,7 +25,7 @@ module ApprovalRuleLike
@@ -25,7 +25,7 @@ module ApprovalRuleLike
scan_finding: 4
scan_finding: 4
}
}
validates :name, presence: true
validates :name, presence: true, length: { maximum: 255 }
validates :approvals_required, numericality: { less_than_or_equal_to: APPROVALS_REQUIRED_MAX, greater_than_or_equal_to: 0 }
validates :approvals_required, numericality: { less_than_or_equal_to: APPROVALS_REQUIRED_MAX, greater_than_or_equal_to: 0 }
validates :report_type, presence: true, if: :report_approver?
validates :report_type, presence: true, if: :report_approver?
Loading