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

[Bug] Native checkbox validation fails #105

Open
stebogit opened this issue Aug 19, 2020 · 3 comments
Open

[Bug] Native checkbox validation fails #105

stebogit opened this issue Aug 19, 2020 · 3 comments

Comments

@stebogit
Copy link

stebogit commented Aug 19, 2020

Version

1.3

Reproduction link

https://jsfiddle.net/jStefano/j23nvhy0

Operating System

MAC OS

Device

MacBook

Browser & Version

Chrome/Firefox

Steps to reproduce

input a username and don't check the checkbox, then hit submit

What is expected?

the browser form validation should display a warning prompting the user to check the terms and conditions checkbox

What is actually happening?

the warning is not shown, in fact nothing happens, and in Chrome an error is logged to the console


Solution

remove visibility: hidden from the input style and move it a bit so that the warning message can appear in the expected position.

.form-check input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    visibility: initial !important;
    left: 27px;
    top: 8px;
}

Additional comments

@dragosct
Copy link
Member

Hi, @stebogit! Thanks for using our products. Did you mean that the style is not present when the checkbox is not selected and you press the submit button, right?

Regards,
Dragos

@stebogit
Copy link
Author

@dragosct10 no the issue is the warning message not showing:

Screen Shot 2020-08-20 at 8 20 57 AM

and this the error you get, only on Chrome, if you have visibility: hidden on the input

Screen Shot 2020-08-20 at 9 30 46 AM

@dragosct
Copy link
Member

Hi! Now I get it. The solution is good the visibility hidden must be removed.

Regards,
Dragos

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

2 participants