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

function parseErrorField() not work for multiple select #549

Open
vin111 opened this issue Jul 28, 2023 · 0 comments
Open

function parseErrorField() not work for multiple select #549

vin111 opened this issue Jul 28, 2023 · 0 comments

Comments

@vin111
Copy link

vin111 commented Jul 28, 2023

Hi I have validation problem on select multiple fields

<div class="form-group group-idTestate">
                          <label for="idTestate" class="col-sm-1 control-label">Testate <i class="required">*</i>
                          </label>
                          <div class="col-sm-4">
                              <select class="form-control chosen chosen-select-deselect" name="idTestate[]"
                                      id="idTestate" data-placeholder="Seleziona Testate" multiple>
                                  <option value=""></option>

return this error

jquery-3.6.0.min.js:2 Uncaught Error: Syntax error, unrecognized expression: form #idTestate[]
    at parseErrorField (custom.js:100:5)

custom.js
function parseErrorField(errors) {
  **$.each(errors, function (index, val) {**

Probably why
$.each(errors, function (index, val) {
it expects a value as a key instead it gets an array
how can i fix the problem
Thank you

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