Skip to content

Errors in the document about the useFieldValidation #104

@Juzisuan965

Description

@Juzisuan965

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'
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions