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.

[Question] How to validate checkbox?

See original GitHub issue

How can I validate following checkbox (code is taken from docs):

<FormGroup check>
    <Label check>
        <Input type="checkbox" />{' '}
        Check me out
    </Label>
</FormGroup>

Setting valid={false} prop to Input component doesn’t work.

Also where should I put FormFeedback component in this case?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rahamin1commented, Jan 7, 2018

I have built a small test example that includes different types of controlled components, maybe it can help. It can be found here, and seen here.

1reaction
supergibbscommented, Jan 5, 2018

I don’t speak for bootstrap but it seems in general it should still work. I see two cases that rely on siblings though. Muting the label when checkbox is disabled and validation so you’ll have to use id for those cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Validate Open Text Responses - Checkbox Survey
1. Add a Single Line Text Question to your survey. · 2. Under Behavior select “Custom Validation” as your answer format. · 3....
Read more >
Simple JavaScript Checkbox Validation - Stack Overflow
The checkbox is a simple "I agree". I want the submit button to be pressed and it will only submit if that check...
Read more >
[Question] Validate checkbox (needs to be checked ... - GitHub
I am currently using a Validation Observer which validates on click and prevents submission if there are still errors. So far so good...
Read more >
How to add validation error for a q-checkbox? - Quasar forum
In q-input, we have “rules” for that. What is the correct way to checkbox validation ?
Read more >
Sitecore Forms Checkbox Mandatory Validation [closed]
I have checkbox filed marked as mandatory in Sitecore Form. However on form submit no message is shown showing value is mandatory.
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