Skip to content

field.props.onInput does not work with v.number schema. #42

@ashtonjurgens

Description

@ashtonjurgens

I have use valibot's number schema, and have an input component connected to it with type="number". The problem is, the value is always a string, which cannot be equal to a number (123 !== "123").

I think the getElementInput function, which is responsible for coercing the element.value according to the type attribute, should give special handling to the "number" type. If it would coerce the string to a number, then spreading field.props would be usable with number schemas.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions