🥇 feature: support browser native form control (#5503)
export default function App() {
const { register, handleSubmit } = useForm({
shouldUseNativeValidation: true,
});
const onSubmit = (data) => console.log(data);
return (
<form onSubmit={handleSubmit(onSubmit)}>
<input
{...register("firstName", {
required: "This is required from bill."
})}
autoComplete={"off"}
placeholder="First Name"
/>
<input type="submit" />
</form>
);
}
🐞 fix #5661 trigger throw error when the field is not found (#5664)
🐞 fix #5678 reset with keep default values with Controller (#5688)