Sha256: 2bb4bb7c5963386cd3f4e531030679d131eb2332568a072dfbbf11ab39acce76

Contents?: true

Size: 344 Bytes

Versions: 114

Compression:

Stored size: 344 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module Letters
    class AuthorSignatureValidator < ActiveModel::Validator
      def validate(letter)
        return if letter.death_notification?

        if letter.author&.signature.blank?
          errors[:signature] << "Author must have a signature"
        end
      end
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
renalware-core-2.0.104 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.103 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.102 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.101 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.100 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.99 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.98 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.97 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.96 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.95 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.94 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.93 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.92 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.91 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.90 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.89 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.88 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.87 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.86 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.85 app/validators/renalware/letters/author_signature_validator.rb