Skip to content

Inputfield::set() and Inputfield::___callUnknown() can mistake settings for attributes #2074

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

Open
JanRomero opened this issue May 17, 2025 · 0 comments

Comments

@JanRomero
Copy link

JanRomero commented May 17, 2025

Hi,

this thread int the forums got me curious. Apparently by manually setting the required HTML5 attribute, you can shoot yourself in the foot: the required setting will no longer be settable, messing up validation.

This bug resides in two places:

When called on to change the required setting, both methods first check if an attribute by that name exists, set the attribute and early-return.

I believe the methods should exclude required from the attribute check, especially since required() is explicitly mentioned as a method in the docs (line 118). But presumably similar issues can arise with other attributes, too.

Cheers

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

1 participant