@@ -40,7 +40,7 @@ class RoleNameMixin:
40
40
role_name = wtforms .SelectField (
41
41
"Select role" ,
42
42
choices = [("" , "Select role" ), ("Maintainer" , "Maintainer" ), ("Owner" , "Owner" )],
43
- validators = [wtforms .validators .DataRequired (message = "Select role" )],
43
+ validators = [wtforms .validators .InputRequired (message = "Select role" )],
44
44
)
45
45
46
46
@@ -49,13 +49,13 @@ class TeamProjectRoleNameMixin:
49
49
"Select permissions" ,
50
50
choices = [("" , "Select role" ), ("Maintainer" , "Maintainer" ), ("Owner" , "Owner" )],
51
51
coerce = lambda string : TeamProjectRoleType (string ) if string else None ,
52
- validators = [wtforms .validators .DataRequired (message = "Select role" )],
52
+ validators = [wtforms .validators .InputRequired (message = "Select role" )],
53
53
)
54
54
55
55
56
56
class UsernameMixin :
57
57
username = wtforms .StringField (
58
- validators = [wtforms .validators .DataRequired (message = "Specify username" )]
58
+ validators = [wtforms .validators .InputRequired (message = "Specify username" )]
59
59
)
60
60
61
61
def validate_username (self , field ):
@@ -212,7 +212,7 @@ class DeleteWebAuthnForm(forms.Form):
212
212
213
213
label = wtforms .StringField (
214
214
validators = [
215
- wtforms .validators .DataRequired (message = "Specify a device name" ),
215
+ wtforms .validators .InputRequired (message = "Specify a device name" ),
216
216
wtforms .validators .Length (
217
217
max = 64 , message = ("Label must be 64 characters or less" )
218
218
),
@@ -238,7 +238,7 @@ class ProvisionWebAuthnForm(WebAuthnCredentialMixin, forms.Form):
238
238
239
239
label = wtforms .StringField (
240
240
validators = [
241
- wtforms .validators .DataRequired (message = "Specify a label" ),
241
+ wtforms .validators .InputRequired (message = "Specify a label" ),
242
242
wtforms .validators .Length (
243
243
max = 64 , message = ("Label must be 64 characters or less" )
244
244
),
@@ -293,15 +293,15 @@ def __init__(self, *args, user_id, macaroon_service, project_names, **kwargs):
293
293
294
294
description = wtforms .StringField (
295
295
validators = [
296
- wtforms .validators .DataRequired (message = "Specify a token name" ),
296
+ wtforms .validators .InputRequired (message = "Specify a token name" ),
297
297
wtforms .validators .Length (
298
298
max = 100 , message = "Description must be 100 characters or less"
299
299
),
300
300
]
301
301
)
302
302
303
303
token_scope = wtforms .StringField (
304
- validators = [wtforms .validators .DataRequired (message = "Specify the token scope" )]
304
+ validators = [wtforms .validators .InputRequired (message = "Specify the token scope" )]
305
305
)
306
306
307
307
def validate_description (self , field ):
@@ -347,7 +347,7 @@ class DeleteMacaroonForm(UsernameMixin, PasswordMixin, forms.Form):
347
347
__params__ = ["confirm_password" , "macaroon_id" ]
348
348
349
349
macaroon_id = wtforms .StringField (
350
- validators = [wtforms .validators .DataRequired (message = "Identifier required" )]
350
+ validators = [wtforms .validators .InputRequired (message = "Identifier required" )]
351
351
)
352
352
353
353
def __init__ (self , * args , macaroon_service , user_service , ** kwargs ):
@@ -381,14 +381,14 @@ class OrganizationRoleNameMixin:
381
381
("Billing Manager" , "Billing Manager" ),
382
382
],
383
383
coerce = lambda string : OrganizationRoleType (string ) if string else None ,
384
- validators = [wtforms .validators .DataRequired (message = "Select role" )],
384
+ validators = [wtforms .validators .InputRequired (message = "Select role" )],
385
385
)
386
386
387
387
388
388
class OrganizationNameMixin :
389
389
name = wtforms .StringField (
390
390
validators = [
391
- wtforms .validators .DataRequired (
391
+ wtforms .validators .InputRequired (
392
392
message = "Specify organization account name"
393
393
),
394
394
wtforms .validators .Length (
@@ -487,7 +487,7 @@ class TransferOrganizationProjectForm(forms.Form):
487
487
"Select organization" ,
488
488
choices = [("" , "Select organization" )],
489
489
validators = [
490
- wtforms .validators .DataRequired (message = "Select organization" ),
490
+ wtforms .validators .InputRequired (message = "Select organization" ),
491
491
],
492
492
)
493
493
@@ -538,7 +538,7 @@ class SaveOrganizationForm(forms.Form):
538
538
539
539
display_name = wtforms .StringField (
540
540
validators = [
541
- wtforms .validators .DataRequired (message = "Specify your organization name" ),
541
+ wtforms .validators .InputRequired (message = "Specify your organization name" ),
542
542
wtforms .validators .Length (
543
543
max = 100 ,
544
544
message = _ (
@@ -550,7 +550,7 @@ class SaveOrganizationForm(forms.Form):
550
550
)
551
551
link_url = wtforms .URLField (
552
552
validators = [
553
- wtforms .validators .DataRequired (message = "Specify your organization URL" ),
553
+ wtforms .validators .InputRequired (message = "Specify your organization URL" ),
554
554
wtforms .validators .Length (
555
555
max = 400 ,
556
556
message = _ (
@@ -566,7 +566,7 @@ class SaveOrganizationForm(forms.Form):
566
566
)
567
567
description = wtforms .TextAreaField (
568
568
validators = [
569
- wtforms .validators .DataRequired (
569
+ wtforms .validators .InputRequired (
570
570
message = "Specify your organization description"
571
571
),
572
572
wtforms .validators .Length (
@@ -582,7 +582,7 @@ class SaveOrganizationForm(forms.Form):
582
582
choices = [("Company" , "Company" ), ("Community" , "Community" )],
583
583
coerce = OrganizationType ,
584
584
validators = [
585
- wtforms .validators .DataRequired (message = "Select organization type" ),
585
+ wtforms .validators .InputRequired (message = "Select organization type" ),
586
586
],
587
587
)
588
588
@@ -609,7 +609,7 @@ class SaveTeamForm(forms.Form):
609
609
610
610
name = wtforms .StringField (
611
611
validators = [
612
- wtforms .validators .DataRequired (message = "Specify team name" ),
612
+ wtforms .validators .InputRequired (message = "Specify team name" ),
613
613
wtforms .validators .Length (
614
614
max = 50 ,
615
615
message = _ ("Choose a team name with 50 characters or less." ),
0 commit comments