Sha256: 3616f239c8748f74956c155b6add42198e6ef69b5d14aded93bb0eea8d8408d7

Contents?: true

Size: 307 Bytes

Versions: 15

Compression:

Stored size: 307 Bytes

Contents

module Railjet
  # @private Use either form or policy
  module Validator
    extend  ::ActiveSupport::Concern
    include ::ActiveModel::Model

    included do
      include Virtus.model(nullify_blank: true)
    end

    def validate!
      valid? || (raise self.class::Error.new(errors))
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
railjet-4.0.0 lib/railjet/validator.rb
railjet-3.5.0 lib/railjet/validator.rb
railjet-3.4.0 lib/railjet/validator.rb
railjet-3.3.0 lib/railjet/validator.rb
railjet-3.2.0 lib/railjet/validator.rb
railjet-3.1.0 lib/railjet/validator.rb
railjet-3.0.0 lib/railjet/validator.rb
railjet-2.1.1 lib/railjet/validator.rb
railjet-2.1 lib/railjet/validator.rb
railjet-2.0 lib/railjet/validator.rb
railjet-2.0.pre4 lib/railjet/validator.rb
railjet-2.0.pre3 lib/railjet/validator.rb
railjet-2.0.pre2 lib/railjet/validator.rb
railjet-2.0.pre1 lib/railjet/validator.rb
railjet-2.0.pre lib/railjet/validator.rb