iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
718 stars 47 forks source link

Field attribute when set to required, the corresponding HTML input is not marked "required" #566

Open akhileshThapliyal opened 3 weeks ago

akhileshThapliyal commented 3 weeks ago

Field attribute when set to required, the corresponding HTML input is not marked "required".

If I mark my field as required and I want to add HTML default validation, the input element does not have the required attribute. Do you know if this is expected? The expectation is that if I mark the field attribute as required, the input element should also have the "required " attribute.

email=Field.email(
    required=True,
    after=1
),

image

boxed commented 2 weeks ago

Looking at this now and it seems like required as a CSS class isn't set in the default style at all, but is mentioned in the docs. I'm not sure what the reasonable approach is here....