Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if input name with number #103

Closed
pvlv opened this issue Apr 5, 2018 · 2 comments
Closed

Error if input name with number #103

pvlv opened this issue Apr 5, 2018 · 2 comments

Comments

@pvlv
Copy link

pvlv commented Apr 5, 2018

Are you submitting a bug report or a feature request?

If input name attr string with number --> <input name="323412" />, I have error "Cannot set a numeric property on an object".

I think this bug happens, because:

// final-form/src/structure/setIn.js

isNaN("4325243")  ===  false // true

isNaN("string_key")  ===  false // false

Sandbox Link

https://codesandbox.io/s/w2po55mw35

@erikras
Copy link
Member

erikras commented Apr 11, 2018

Due to the way it processes arrays of field, Final Form does not support numeric field names. You'll have to prefix them with a non-numeric character.

@erikras erikras closed this as completed Apr 11, 2018
@lock
Copy link

lock bot commented Apr 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants