File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 2222
2323
2424def validate_play_key (form , field ):
25- """Validates a field for a valid phone number
25+ """Validates a field for a valid play kyey
2626 Args:
2727 form: REQUIRED, the field's parent form
2828 field: REQUIRED, the field with data
2929 Returns:
3030 None, raises ValidationError if failed
3131 """
32- # jank to get the fireign key that we need back into the field
32+ # jank to get the foreign key that we need back into the field
3333 if current_app .config ["REQUIRE_PLAY_KEY" ]:
3434 field .data = PlayKey .key_is_valid (key_string = field .data )
35- return
35+ return True
3636
3737class CustomRecaptcha (Recaptcha ):
3838 def __call__ (self , form , field ):
@@ -49,10 +49,7 @@ def customize(self, app):
4949class CustomRegisterForm (RegisterForm ):
5050 play_key_id = StringField (
5151 'Play Key' ,
52- validators = [
53- Optional (),
54- validate_play_key ,
55- ]
52+ validators = [validate_play_key ]
5653 )
5754 recaptcha = RecaptchaField (
5855 validators = [CustomRecaptcha ()]
You can’t perform that action at this time.
0 commit comments