Sha256: 140126638ecc3d8b9c73f1d601ef863be449814b5b706811090cb547ae25b8d2

Contents?: true

Size: 447 Bytes

Versions: 10

Compression:

Stored size: 447 Bytes

Contents

module Phccodesnipper
  class Script::Url < ApplicationRecord

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

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

10 entries across 10 versions & 1 rubygems

Version Path
phccodesnipper-6.1.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-6.0.1 app/models/phccodesnipper/script/url.rb
phccodesnipper-6.0.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-5.4.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-5.3.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-5.2.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-5.1.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-5.0.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-4.0.0 app/models/phccodesnipper/script/url.rb
phccodesnipper-3.0.0 app/models/phccodesnipper/script/url.rb