Sha256: c530634927c5687cc11682ae24540bce0a7c970b48a191902a226bd99e2bb262

Contents?: true

Size: 322 Bytes

Versions: 12

Compression:

Stored size: 322 Bytes

Contents

module Valigator
  module CSV
    module FieldValidators
      class Mandatory < Base

        def valid?(value)
          not blank? value
        end



        def error_type
          'missing_field'
        end



        def error_message
          'Missing mandatory field'
        end

      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
valigator-csv-4.0.2 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-4.0.1 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-4.0 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-3.0 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-2.0.1 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-2.0 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.5.1 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.5.0 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.4.1 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.4.0 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.3.2 lib/valigator/csv/field_validators/mandatory.rb
valigator-csv-1.3.1 lib/valigator/csv/field_validators/mandatory.rb