Skip to content
New issue

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

DOCUMENTATION Issue: Wrong method signature? #4135

Closed
joe-oli opened this issue Mar 18, 2024 · 1 comment
Closed

DOCUMENTATION Issue: Wrong method signature? #4135

joe-oli opened this issue Mar 18, 2024 · 1 comment
Labels
needs triage Initial label given, to be assigned correct labels and assigned

Comments

@joe-oli
Copy link

joe-oli commented Mar 18, 2024

In the section: Custom validation rules
https://rjsf-team.github.io/react-jsonschema-form/docs/usage/validation

The method signature appears wrong?

function customValidate(formData, errors, uiSchema) {
//
}
  1. It should be RJSFSchema not uiSchema ?
  2. errors should be 3rd parameter, not second ?

const customValidate= (formData: any, schema: RJSFSchema, errors: any) => { }

EDIT: I am closing and / or deleting this. My bad, I misunderstood the definition !!
In the CustomValidator type definition, the part <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> does not directly correspond to the parameters of the function.

@github-actions github-actions bot added the needs triage Initial label given, to be assigned correct labels and assigned label Mar 18, 2024
@joe-oli
Copy link
Author

joe-oli commented Mar 19, 2024

EDIT: I am closing and / or deleting this. My bad, I misunderstood the definition !!
In the CustomValidator type definition, the part <T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> does not directly correspond to the parameters of the function.

@joe-oli joe-oli closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Initial label given, to be assigned correct labels and assigned
Projects
None yet
Development

No branches or pull requests

1 participant