class Article < ActiveRecord::Base

end
class Article < ActiveRecord::Base

  # title and description for record is mandatory
  validates :title, presence: true,
            length: { minimum: 3, maximum: 50 }
  validates :description, presence: true,
            length: { minimum: 10, maximum: 300 }

end
Add validations for title and description attributes
Add validations for title and description attributes
