Skip to content

Commit

Permalink
Update validators.md
Browse files Browse the repository at this point in the history
Changed import schemaHooks to import hooks as schemaHooks, otherwise we get an error "Module '"@feathersjs/schema"' has no exported member 'schemaHooks'."
  • Loading branch information
bigbluekayak authored Dec 18, 2024
1 parent 967ea54 commit 5b97548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/schema/validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The following hooks take a [validation function](#validation-functions) and vali
`schemaHooks.validateData` takes a [validation function](#validation-functions) and allows to validate the `data` in a `create`, `update` and `patch` request as well as [custom service methods](../services.md#custom-methods). It can be used as an `around` or `before` hook.

```ts
import { Ajv, schemaHooks } from '@feathersjs/schema'
import { Ajv, hooks as schemaHooks } from '@feathersjs/schema'
import { Type, getValidator } from '@feathersjs/typebox'
import type { Static } from '@feathersjs/typebox'
import { dataValidator } from '../validators'
Expand Down

0 comments on commit 5b97548

Please sign in to comment.