Sha256: 63549fc797721c03a0ca66d2fd92224c0dae379e7c198b4072c1b1b14fe30d9b

Contents?: true

Size: 234 Bytes

Versions: 16

Compression:

Stored size: 234 Bytes

Contents

module Ti
  class DocValidator < ActiveModel::Validator
    def validate(record)

      unless record.title.present?
        record.errors[:title] = 'Название не может быть пустым'
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.24 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.23 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.22 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.21 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.20 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.18 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.17 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.16 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.15 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.14 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.13 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.12 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.11 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.10 engines/ti/app/models/ti/doc_validator.rb
c80_yax-0.1.0.9 engines/ti/app/models/ti/doc_validator.rb