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.

Property 'required' makes form unusable

See original GitHub issue

When a Choice is ‘required’ but not valid an error is thrown in the console:

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

The error cancels the form submit event.

Example: https://jsbin.com/xixupew/6

btw. The required property is not inherited from the original tag

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

2reactions
maximelebretoncommented, Oct 17, 2018

If you want to keep your required attribute with a native html5 validation behaviour: https://github.com/jshjohnson/Choices/issues/449

1reaction
martijnvbeekcommented, Feb 21, 2018

A solution could be to move the name + id + required (and other attributes) from the original select to the input. choices__input

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property 'required' makes form unusable · Issue #338 - GitHub
I've solved the problem by removing the required property from the form element and stored the required Choice in memory. With a 'submit' ......
Read more >
Unusable Personal Property Definition - Law Insider
Unusable Personal Property means Authority property other than real property which has become permanently useless to the Authority through damage, obsolescence ...
Read more >
Validation | required="true" / "false" | HTML form - Stack Overflow
It assumes the value of true once it is present. therefore setting it to a 'false' still makes it act as though it...
Read more >
Client-side form validation - Learn web development | MDN
A field is invalid if it has a value and that value has fewer characters than the minlength value or more than the...
Read more >
2021 Instructions for Form 4797 - IRS
Report the gain including any depreciation recapture required by sections 1245 and 1250 as it would otherwise be reported if you were not...
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