Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akhileshThapliyal opened this issue Aug 24, 2024 · 1 comment

Comments

@akhileshThapliyal
Copy link

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
Copy link
Collaborator

boxed commented Aug 28, 2024

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....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants