From b982793fbf5b23205cd2c4d77e452ee727fe19cf Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 28 May 2017 09:33:22 +1200 Subject: [PATCH] Wikipedia url is always required The form says it's required, so it should be required. --- app/models/crop.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/crop.rb b/app/models/crop.rb index 5f5eae30c..b7ce12767 100644 --- a/app/models/crop.rb +++ b/app/models/crop.rb @@ -47,8 +47,7 @@ class Crop < ActiveRecord::Base format: { with: %r{\Ahttps?:\/\/en\.wikipedia\.org\/wiki\/[[:alnum:]%_\.()-]+\z}, message: 'is not a valid English Wikipedia URL' - }, - if: :approved? + }, presence: true ## Reasons are only necessary when rejecting validates :reason_for_rejection, presence: true, if: :rejected?