Skip to content
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

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

Closed
PavelJurasek opened this issue Feb 3, 2015 · 1 comment

Comments

@PavelJurasek
Copy link

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

@dg dg closed this as completed in 22d3d82 Feb 8, 2015
dg added a commit that referenced this issue Feb 8, 2015
dg added a commit that referenced this issue Feb 8, 2015
dg added a commit that referenced this issue Feb 8, 2015
dg added a commit that referenced this issue Feb 8, 2015
@PavelJurasek
Copy link
Author

🙏 Thank you!

dg added a commit that referenced this issue Feb 8, 2015
dg added a commit that referenced this issue Feb 19, 2015
dg added a commit that referenced this issue Feb 19, 2015
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