vercel-labs / vercel-labs/json-render
Errors in the document about the useFieldValidation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 901
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 4
Description
the document:
import { useFieldValidation } from '@json-render/react';
function TextField({ props }) {
const { value, setValue, errors, validate } = useFieldValidation(
props.valuePath,
props.checks
);
return (
<div>
<label>{props.label}</label>
<input
value={value || ''}
onChange={(e) => setValue(e.target.value)}
onBlur={() => validate()}
/>
{errors.map((error, i) => (
<p key={i} className="text-red-500 text-sm">{error}</p>
))}
</div>
);
}
but i got error, and i reviewed the type,there is no 'value'、'setValue'
and i want to use form validation,do I need to make any configuration for the catalog?
I would like to know on what basis LLM generates the verification conditions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the document section containing the useFieldValidation example and compare it with the hook's exported type, especially the values shown in the issue. Clarify the valid usage and document whether catalog configuration is required for form validation. Also explain, based on the documented API, how validation conditions are determined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100