Commit f0bee003 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

propagate required

parent c9e6ec61
......@@ -24,6 +24,8 @@ def bootstrap(object):
css_classes = set(attrs.get("class", "").split(" "))
if field.errors:
css_classes.add("is-invalid")
if field.field.required:
attrs['required'] = 'required'
print(type(field.field.widget))
if isinstance(field.field.widget, widgets.CheckboxInput):
wrapping_classes = "form-check"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment