mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 09:43:24 -04:00
Wikipedia url is always required
The form says it's required, so it should be required.
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user