X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/cf4234876994cb4b7e09cdd116e092424d9f4951..7ea8b24f8b002feba79f92e5333f1ec5c6e9f929:/app/models/quick_vote.rb?ds=sidebyside 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.")