Skip to content

JS: failing max_length validation on checkbox list with exactly 1 item #59

@PavelJurasek

Description

@PavelJurasek

Minimal code in sandbox

protected function createComponentForm() { $form = new Form(); $form->addCheckboxList('list', NULL, [ 1 => 'one', ])->addRule(Form::MAX_LENGTH, 'max is %d', 20); $form->addSubmit('submit', 'Submit'); $form->onSuccess[] = function() { dump('success'); }; return $form; }

val.length is undefined (val == TRUE) in netteForms.js

min_length is affected as well

Unfortunately I can't help you with js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions