From e933ab305b912bb17d6c23251013e5dec0f59c15 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Thu, 12 Sep 2013 14:45:25 -0700 Subject: [PATCH] Add param documentation for VPrintable. --- r2/r2/lib/validator/validator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/r2/r2/lib/validator/validator.py b/r2/r2/lib/validator/validator.py index 425752600..8b990c15f 100644 --- a/r2/r2/lib/validator/validator.py +++ b/r2/r2/lib/validator/validator.py @@ -569,6 +569,12 @@ class VPrintable(VLength): self.set_error(errors.BAD_STRING) return None + def param_docs(self): + return { + self.param: "a string up to %d characters long," + " consisting of printable characters." + % self.max_length, + } class VTitle(VLength): def __init__(self, param, max_length = 300, **kw):