final-form / final-form/react-final-form

required is passed to dom input but then it is not

Open
#461 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### Are you submitting a **bug report** or a **feature request**?
Bug report

While investigating another issue ([react-final-form-html5-validation#10](https://github.com/final-form/react-final-form-html5-validation/issues/10), [react-final-form-html5-validation#14](https://github.com/final-form/react-final-form-html5-validation/issues/14)), I discovered that `required` _IS_ sometimes passed to the underlying DOM input element... I believe this isn't right, though I wish if it was sent in both examples.

### What is the current behavior?

`required` is passed in first two examples, but not in third.

```
// first is ommited as it is using Field from react-final-form-html5-validation


Required Field*

{({ input, meta }) => (


Required Field*

{meta.error && meta.touched && {meta.error}}

)}

```

![required-field](https://user-images.githubusercontent.com/2313018/56868797-b8d02c80-69f7-11e9-926a-ae568898fc28.gif)

### What is the expected behavior?

Expected is that parent `` doesn't pass the `required` prop to underlying `input` in both cases OR that it does send ALL the additional parameters to the `input` in both cases.

### Sandbox Link + environment

https://codesandbox.io/s/wqrywv2lkw

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.