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.147 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.146 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.145 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.144 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.143 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.142 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.141 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.140 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.139 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.138 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.137 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.136 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.135 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.134 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.133 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.132 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.131 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.130 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.129 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.128 app/validators/renalware/letters/author_signature_validator.rb