You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/models/web_footer_company.rb

9 lines
380 B

class WebFooterCompany < ActiveRecord::Base
attr_accessible :logo_size, :name, :url
validates :name, presence: true, length: { maximum: 500 }
validates :url, length: { maximum: 500 },
format: { with: /(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/,
message: :invalid
}
end