Yet another wikipedia url char added to regex

This commit is contained in:
Brenda Wallace committed 2016-12-06 21:58:17 +13:00
1 parent 41e408b04a
commit a7bafafa06
1 file changed
+1 -1
+1 -1
View File
@@ -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?