We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The deferInputValidation parameter in useFormField is currently hardcoded in the Input component:
deferInputValidation
useFormField
Input
const { emitFormBlur, emitFormInput, /* ... */ } = useFormField<InputProps>(props, { deferInputValidation: false // Hardcoded })
This limits flexibility, as consumers of the Input component cannot control validation timing behavior (e.g., validate on blur vs. validate on input).
Make deferInputValidation configurable via a component prop:
useFormField<InputProps>(props, { deferInputValidation: props.deferInputValidation })
deferInputValidation?: boolean
true
false
Requires updates to:
This change supports Inversion of Control — empowering component consumers to control validation timing based on specific UX needs.
### Additional context _No response_
The text was updated successfully, but these errors were encountered:
romhml
No branches or pull requests
Description
🔧 Current Behavior
The
deferInputValidation
parameter inuseFormField
is currently hardcoded in theInput
component:This limits flexibility, as consumers of the
Input
component cannot control validation timing behavior (e.g., validate on blur vs. validate on input).✅ Proposed Solution
Make
deferInputValidation
configurable via a component prop:useFormField
:deferInputValidation?: boolean
💡 Use Cases
🔁 Alternatives Considered
🧪 Testing Impact
true
andfalse
cases📚 Documentation
Requires updates to:
⚙️ Why This Matters
This change supports Inversion of Control — empowering component consumers to control validation timing based on specific UX needs.
The text was updated successfully, but these errors were encountered: