nextras / form-components

Form components for Nette Framework (architecture & UI components)
Other
11 stars 3 forks source link

Method setRequired doesn't work on AutocompleteControl #2

Open EdaCZ opened 3 years ago

EdaCZ commented 3 years ago

If i use method ->setRequired(true) on AutocompleteControl it crashes after form sending, because standard validator has incompatible typehint in parameter.

Argument 1 passed to Nette\Forms\Validator::validateFilled() must be an instance of Nette\Forms\Controls\BaseControl, instance of Nextras\FormComponents\Controls\AutocompleteControl given, called in /.../vendor/nette/forms/src/Forms/Rules.php on line 283
KacerCZ commented 6 months ago

Hi, today I encountered this bug. It does not work because of this change in Nette forms: https://github.com/nette/forms/pull/157