X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/cf4234876994cb4b7e09cdd116e092424d9f4951..94f9b1405c2eefc97faf91ad14ec775584fca65a:/app/models/quick_vote.rb?ds=inline diff --git a/app/models/quick_vote.rb b/app/models/quick_vote.rb index 0efb574..13e6168 100644 --- a/app/models/quick_vote.rb +++ b/app/models/quick_vote.rb @@ -17,6 +17,9 @@ class QuickVote < Election if name =~ /[^A-Za-z0-9]/ errors.add(:name, "must only include numbers and letters.") end + if name =~ /^[0-9]+$/ + errors.add(:name, "must not be a number") + end if name =~ /^(create|index|confirm|change|results)$/ errors.add(:name, " is a reserved word.")