mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-27 17:28:26 -04:00
Yet another wikipedia url char added to regex
This commit is contained in:
1 parent
41e408b04a
commit
a7bafafa06
1 file changed
+1
-1
+1
-1
@@ -42,7 +42,7 @@ class Crop < ActiveRecord::Base # rubocop:disable Metrics/ClassLength
|
||||
## Wikipedia urls are only necessary when approving a crop
|
||||
validates :en_wikipedia_url,
|
||||
format: {
|
||||
with: /\Ahttps?:\/\/en\.wikipedia\.org\/wiki\/[[:alnum:]%_()-]+\z/,
|
||||
with: /\Ahttps?:\/\/en\.wikipedia\.org\/wiki\/[[:alnum:]%_\.()-]+\z/,
|
||||
message: 'is not a valid English Wikipedia URL'
|
||||
},
|
||||
if: :approved?
|
||||
|
||||
Reference in new issue
Block a user