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.

[Validation] Using required attribute?

See original GitHub issue

Hi folks,

Is there any simple way to let us using native HTML5 attribute like required to handle native use cases of forms? Truly, your package is really useful, but do not break native things please.

As I see, the required attribute was working on v1, and it was dropped on v2. I can understand that is a lot of work to rewrite native component in React, but please if there are BC break, give us alternatives to fix them.

I can read here:

may be implemented in a later version

How can you say “may be” in this case? required is a native attribute of an input, it’s must work in every case.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:27
  • Comments:11

github_iconTop GitHub Comments

7reactions
rystraumcommented, Sep 13, 2019

The bug actually originates in autosizeinput. I tracked it down to this file: https://github.com/JedWatson/react-input-autosize/blob/master/lib/AutosizeInput.js

required prop is passed into Autosizeinput, but it does not pass forward props to the underlying input field.

5reactions
ashlincascadecommented, Oct 7, 2020

Bump! This is essential for form components.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML input required Attribute - W3Schools
The required attribute is a boolean attribute. When present, it specifies that an input field must be filled out before submitting the form....
Read more >
How to perform form validation for a required field in HTML
1. Required attribute: If you want to make an input mandatory to be entered by the user, you can use the required attribute....
Read more >
HTML attribute: required - HTML: HyperText Markup Language
The Boolean required attribute, if present, indicates that the user must specify a value for the input before the owning form can be...
Read more >
3 Examples of HTML Required Attribute - eduCBA
Guide to HTML Required Attribute. Here we discuss Syntax, learn Required Attributes and examples to implement with proper codes and outputs.
Read more >
6 Reasons - HTML5 Required Attribute Validation not Working
Browsers Support for HTML5 Required Attribute · 1. The Form Tag has “novalidate” Attribute · 2. Required Attribute Validation doesn't Work with ......
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