Skip to content

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

Open
@JanRomero

Description

@JanRomero

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions