Sha256: 6d68dfb07223fd9096978c9a3efd577ed0c4e9f81bcbed565cc65b0e0915df27

Contents?: true

Size: 456 Bytes

Versions: 4

Compression:

Stored size: 456 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 :script_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

Version Path
phcdevworks_scripts-2.3.1 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-2.3.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-2.2.0 app/models/phcdevworks_scripts/snippet/url.rb
phcdevworks_scripts-2.1.1 app/models/phcdevworks_scripts/snippet/url.rb