Sha256: 0b63533b453eef1c138ee7064a790cbdbc5f65bfaa4ded3b3f95e6a421c36a26
Contents?: true
Size: 582 Bytes
Versions: 4
Compression:
Stored size: 582 Bytes
Contents
module PhcdevworksScripts class Snippet::Url < ApplicationRecord # Include Core Validations phc_domain_regx = URI::regexp(%w(http https)) # Paper Trail Initialize has_paper_trail :class_name => 'PhcdevworksScripts::SnippetUrlVersions' # Relationships belongs_to :post, class_name: 'PhcdevworksScripts::Snippet::Post' # Form Fields Validation validates :snippet_post_url, presence: true, format: { :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" } end end
Version data entries
4 entries across 4 versions & 1 rubygems