Sha256: e9a968bc9999794050da272cb48adabfce7665a57c3fa502d46fcab6fc7a0665

Contents?: true

Size: 343 Bytes

Versions: 28

Compression:

Stored size: 343 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

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.46 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.45 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.44 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.43 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.42 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.41 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.40 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.39 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.38 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.37 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.36 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.35 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.34 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.33 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.32 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.31 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.30 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.28 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.27 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.26 app/validators/renalware/letters/author_signature_validator.rb