Sha256: 9a9550c098df5252b76c0821349e953d7677244aa2f8525098b2b287a243584c

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

module PhcdevworksScripts
  class Snippet::Url < ApplicationRecord

    # Include Core Validations
    phc_domain_regx = URI::regexp(%w(http https))

    # Relationships
    belongs_to :snippet, class_name: 'PhcdevworksScripts::Script::Snippet'

    # Form Fields Validation
    validates :snippet_url,
      presence: true,
      format: {  :with => phc_domain_regx, message: "Please follow this URL format http or https://www.**********.com" }

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phcdevworks_scripts-3.0.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-3.0.0 app/models/phcdevworks_scripts/snippet/url.rb