<FormField
control={form.control}
name="lrn"
render={({ field }) => (
<FormItem>
<FormLabel>
LRN (Learner Reference Number){" "}
<span className="text-destructive">*</span>
</FormLabel>
<FormControl>
<Input
placeholder="Enter your learner reference number"
type="text" // Convert type to text
{...field}
onChange={(e) => {
const value = e.target.value.replace(/[^0-9]/g, ""); // Replace any non-numeric characters with an empty string
field.onChange(value); // Update the form field value with the sanitized input
}}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
enrollment form