From 2241862475c3a1a4f3b230590d20bb89453b4a9a Mon Sep 17 00:00:00 2001 From: chiu Date: Sun, 2 Aug 2020 14:11:14 +0800 Subject: [PATCH] remove validate url --- app/models/bulletin_link.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bulletin_link.rb b/app/models/bulletin_link.rb index 6283857..a3f2b1c 100644 --- a/app/models/bulletin_link.rb +++ b/app/models/bulletin_link.rb @@ -12,7 +12,7 @@ class BulletinLink before_validation :add_http - validates :url, :presence => true, :format => /\A(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?\Z/i + #validates :url, :presence => true, :format => /\A(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?\Z/i protected