Sha256: aaec0c4963b1b521e882e15fbc91de7c3ba25afcab270f2a34f6470bd7a26c62

Contents?: true

Size: 453 Bytes

Versions: 11

Compression:

Stored size: 453 Bytes

Contents

module Phccodesnipperpro
  class Script::Url < ApplicationRecord

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

    # Relationships
    belongs_to :snippet, class_name: 'Phccodesnipperpro::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

11 entries across 11 versions & 1 rubygems

Version Path
phccodesnipperpro-5.0.2 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-5.0.1 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-5.0.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-4.4.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-4.3.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-4.2.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-4.1.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-4.0.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-3.0.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-2.0.0 app/models/phccodesnipperpro/script/url.rb
phccodesnipperpro-1.0.0 app/models/phccodesnipperpro/script/url.rb