mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Increase length of max subreddit name in validator
"internationalpolitics" is longer than 20 chars
This commit is contained in:
@@ -421,7 +421,7 @@ class VCssMeasure(Validator):
|
||||
def run(self, value):
|
||||
return value if value and self.measure.match(value) else ''
|
||||
|
||||
subreddit_rx = re.compile(r"\A[A-Za-z0-9][A-Za-z0-9_]{2,%s}\Z" % Subreddit.MAX_SRNAME_LENGTH)
|
||||
subreddit_rx = re.compile(r"\A[A-Za-z0-9][A-Za-z0-9_]{2,20}\Z")
|
||||
|
||||
def chksrname(x):
|
||||
#notice the space before reddit.com
|
||||
|
||||
@@ -86,9 +86,7 @@ class Subreddit(Thing, Printable):
|
||||
gold_limit = 100
|
||||
DEFAULT_LIMIT = object()
|
||||
|
||||
# Note: this value can increase but should never go down or it won't match
|
||||
# names already in the db
|
||||
MAX_SRNAME_LENGTH = 20
|
||||
MAX_SRNAME_LENGTH = 200 # must be less than max memcached key length
|
||||
|
||||
# note: for purposely unrenderable reddits (like promos) set author_id = -1
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user