I only want numeric character input in the pattern, but it also accepts when I say ms3 for example. I want only numeric characters to be accepted. How do you think I can do?
<td>
<input
type="text"
className="form-control text-uppercase"
id="date_of_delivery"
name="date_of_delivery"
defaultValue={offer.date_of_delivery}
{...register("date_of_delivery", {
required: true,
pattern: /[0-9]/,
})}
/>
{errors?.date_of_delivery?.type === "required" &&
<p>Bu alan zorunludur.</p>}
{errors?.date_of_delivery?.type === "pattern" && <p>Lütfen sayısal bir değer giriniz.</p>}
</td>