Sha256: 8173abe09423dfba19850465f5d7eb2f8cd76cc9e656b8af765748119907dc3f

Contents?: true

Size: 400 Bytes

Versions: 2

Compression:

Stored size: 400 Bytes

Contents

module BootstrapValidatorRails
  module Validators
    class Presence < Validator
      def generate_options!(options = {})
        return if unsupported?

        @js_options['notEmpty'] = {} 
        @html_attributes[:bv_notempty] = 'true'

        @js_options['notEmpty']['message'] = generate_message
        @html_attributes[:bv_notempty_message] = generate_message 
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap_validator_rails-1.1.0 lib/bootstrap_validator_rails/validators/presence_validator.rb
bootstrap_validator_rails-1.0.0 lib/bootstrap_validator_rails/validators/presence_validator.rb