question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Checkbox "validate" not showing/implemented

See original GitHub issue

Native validation on checkboxes is important. The first example that comes to mind is to confirm having read the Terms of Service before registering to said service.

However, it does not seem to work, despite using the same syntax as for other input fields:

<div class="input-field no-margin col s12 m9">
    <input type="checkbox" name="accept" id="regTOS" required class="validate">
    <label for="regTOS" data-error="You must accept the Terms of Service">I accept the Terms of Service</label>
</div>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
newswimcommented, Jun 15, 2016

Since i really wanted to show the native validation, I removed the left: -9999px property and added margin-top: 8px; just so it lines up a little nicer.

1reaction
Dogfalocommented, Jul 19, 2017

Fixed in 57423d86

Read more comments on GitHub >

github_iconTop Results From Across the Web

Material design lite required validation on checkbox is not ...
I am using material design lite for a form. The issue that I'm facing is that when required validation is set on a...
Read more >
Inputcheckbox Required field not throwing a validation
It is not throwing an validation error because an empty checkbox explicitly HAS a value of false, so it is filled in (AKA,...
Read more >
Checkbox validation problem since last updates | WordPress.org
Hi, I realized there's a problem with the checkbox validation since last updates. ... “no errors displayed or red lines on the other...
Read more >
Choosing the type of reCAPTCHA - Google Developers
reCAPTCHA v3; reCAPTCHA v2 ("I'm not a robot" Checkbox) ... (with No CAPTCHA) or challenge them to validate whether or not they are...
Read more >
The best way to implement custom validators - Angular inDepth
Learning best practices on how to build your custom validator in Angular by ... ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found