Skip to content

Commit

Permalink
Enable translation in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-nathan committed Apr 15, 2024
1 parent 6b0b4b8 commit 3b50c98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ class Project < AbstractModel # rubocop:disable Metrics/ClassLength
before_destroy :orphan_drafts
validates :field_slip_prefix, uniqueness: true, allow_blank: true
validates :field_slip_prefix,
allow_blank: true,
format: { with: /\A[A-Z0-9]+\z/,
message: :alphanumerics_only.t }
message: proc { :alphanumerics_only.t } }

scope :show_includes, lambda {
strict_loading.includes(
Expand Down

0 comments on commit 3b50c98

Please sign in to comment.