@@ -163,7 +163,6 @@ class Input:
163
163
"""
164
164
165
165
html_params = staticmethod (html_params )
166
- validation_attrs = ["required" , "disabled" ]
167
166
168
167
def __init__ (self , input_type = None ):
169
168
if input_type is not None :
@@ -232,6 +231,7 @@ class HiddenInput(Input):
232
231
"""
233
232
234
233
input_type = "hidden"
234
+ validation_attrs = ["disabled" ]
235
235
236
236
def __init__ (self , * args , ** kwargs ):
237
237
super ().__init__ (* args , ** kwargs )
@@ -246,6 +246,7 @@ class CheckboxInput(Input):
246
246
"""
247
247
248
248
input_type = "checkbox"
249
+ validation_attrs = ["required" , "disabled" ]
249
250
250
251
def __call__ (self , field , ** kwargs ):
251
252
if getattr (field , "checked" , field .data ):
@@ -262,6 +263,7 @@ class RadioInput(Input):
262
263
"""
263
264
264
265
input_type = "radio"
266
+ validation_attrs = ["required" , "disabled" ]
265
267
266
268
def __call__ (self , field , ** kwargs ):
267
269
if field .checked :
@@ -301,6 +303,7 @@ class SubmitInput(Input):
301
303
"""
302
304
303
305
input_type = "submit"
306
+ validation_attrs = ["required" , "disabled" ]
304
307
305
308
def __call__ (self , field , ** kwargs ):
306
309
kwargs .setdefault ("value" , field .label .text )
@@ -568,7 +571,7 @@ class RangeInput(Input):
568
571
"""
569
572
570
573
input_type = "range"
571
- validation_attrs = ["required" , " disabled" , "max" , "min" , "step" ]
574
+ validation_attrs = ["disabled" , "max" , "min" , "step" ]
572
575
573
576
def __init__ (self , step = None ):
574
577
self .step = step
@@ -585,3 +588,4 @@ class ColorInput(Input):
585
588
"""
586
589
587
590
input_type = "color"
591
+ validation_attrs = ["disabled" ]
0 commit comments