Sha256: 37b17e763d6bb0538980fe8b2949fc3840ad45e483b14636b26c425a2cae420c

Contents?: true

Size: 328 Bytes

Versions: 8

Compression:

Stored size: 328 Bytes

Contents

module Renalware
  module Letters
    class AuthorSignatureValidator < ActiveModel::Validator
      def validate(letter)
        return if letter.death_notification?
        if letter.author && letter.author.signature.blank?
          errors[:signature] << "Author must have a signature"
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta11 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta10 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta9 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta8 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta7 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta6 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta5 app/validators/renalware/letters/author_signature_validator.rb
renalware-core-2.0.0.pre.beta4 app/validators/renalware/letters/author_signature_validator.rb