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

BUG: REACT HOOK FORM preact MAX INPUT #4565

Closed
VigilioYonatan opened this issue Nov 23, 2024 · 1 comment
Closed

BUG: REACT HOOK FORM preact MAX INPUT #4565

VigilioYonatan opened this issue Nov 23, 2024 · 1 comment

Comments

@VigilioYonatan
Copy link

// error register react hook form have the type register max like number and preact input have a string.

import { useForm } from "react-hook-form";

export function App() {
    const { register } = useForm<{ name: string }>();
    return (
        <>
            <input type="text" {...register("name")} max="" /> // error 
        </>
    );
}
@JoviDeCroock
Copy link
Member

JoviDeCroock commented Nov 23, 2024

Hey,

We have an issue template, I don't really fully understand what you are expecting to happen or what I have to do reproduce it. Could you please follow the template.

Also this looks like expected behaviour an input node accepts maxLength for text and max for number. Your input is of type text which makes max non-existent, from your example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants