Open algorithm-developer opened 4 months ago
@algorithm-developer Input type pattern is not supposed to block the user on entering invald pattern text. On submitting the value in a form, it will pop up validation error. Your issue for input type tel is valid, though!
@shadcn I can take this up.
Raised PR for the issue https://github.com/shadcn-ui/ui/pull/3560
@algorithm-developer Input type pattern is not supposed to block the user on entering invald pattern text. On submitting the value in a form, it will pop up validation error. Your issue for input type tel is valid, though!
@AtharvaJoshi16
Example: I want to take phone numbers from clients (users). I must put input type to "tel" because without that users can type letters on it. After set type and pattern its still taking letter inputs on it even type is set to "tel" and even pattern set.
Describe the bug
Input component can't handle type tel and pattern. I can type letters on it even type is tel.
Affected component/components
import { Input } from "@/app/components/shadcn/ui/input";
How to reproduce
Use input component on page like this template then write letter on it.
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting