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

form validation not working right ( required='' ) #1086

Closed
Kryptonit3-zz opened this issue Jul 4, 2015 · 2 comments
Closed

form validation not working right ( required='' ) #1086

Kryptonit3-zz opened this issue Jul 4, 2015 · 2 comments

Comments

@Kryptonit3-zz
Copy link

I have the drop-down select set as required

<select class="selectpicker bs-select-hidden" required multiple name="versions">
    <option value="1">4.2</option>
    <option value="2">5.0</option>
    <option value="3">5.1</option>
</select>

Everything works wonderfully unless..

A user hasn't made a selection but goes to submit the form. Normally the screen would jump to the select and highlight it, but since the <select> is hidden this is not the case.

An invalid form control with name='versions' is not focusable.

Is there a way to check for the required tag on the original <select> and listen for form submit and if no selection, jump to or FLASH the drop-down?

Thanks!

@caseyjhol
Copy link
Member

Duplicate of #514

@RaviDavda
Copy link

I face same issue. I m using bootstrap selectpicker select box. At the time of submitting the form even if i doesnt selected any value from selectbox it does not display any error even it is set to required. Please I am looking for solutions.

Thanks in advance

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

3 participants