Merge pull request #3415 from alphagov/normalise-2fa-code-input

Allow spaces and dashes in the two factor code
This commit is contained in:
Chris Hill-Scott
2020-04-21 10:14:19 +01:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -177,6 +177,10 @@ class SMSCode(StringField):
def __call__(self, **kwargs):
return super().__call__(type='tel', pattern='[0-9]*', **kwargs)
def process_formdata(self, valuelist):
if valuelist:
self.data = Columns.make_key(valuelist[0])
class ForgivingIntegerField(StringField):