My Requirement : To Add validation to make sure that SITEMAP_URL keyword is always included in search_engines.url and it should be of format http://www.example.com/
class SearchEngine < ActiveRecord::Base
validates :name, :ping_url, :uniqueness => true, :presence => true
validates :ping_url, :format => {:with => /\=SITEMAP_URL$/}, :presence => true
end
Is the validation i have written is correct .