X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/cf4234876994cb4b7e09cdd116e092424d9f4951..df81b74ceb3e11d9de2e523bf93c6c69d5da1dfb:/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.")