class AppCatalog::WebApp < ApplicationRecord store :metadata, coder: JSON validates :url, presence: true, uniqueness: true validates :url, format: { with: URI.regexp }, if: Proc.new { |a| a.url.present? } end