Skip to content

TypeAhead Widget not working with some Validators, like HiddenUnless #5048

@jbtwist

Description

@jbtwist

Describe the bug
When you combine TypeAhead Widget with attributes for validators added at render_field function, it won't work because those validators won't be added

To Reproduce
Steps to reproduce the behavior:

  1. Go to any registration form (in my case, I went to RegistrationFormForm)
  2. Add a first (A) StringField with HiddenUnless validator and TypeaheadWidget
  3. Add a second (B) StringField only with HiddenUnless validator
  4. Activate the field that triggers the HiddenUnless, it will only work on B.

Expected behavior
I expect the HiddenUnless validator (and other extra validators) to work in combination with Typeahead widget.

Screenshots
image
image.

Additional context
I'm not sure if this issue is afecting to more widgets. For example I think it is afecting to the ckeditor_widget, but I have not tested it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions