You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/schema/validators.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Ajv and most other validation libraries are only used for ensuring data is valid
14
14
15
15
## Usage
16
16
17
-
The following is the standard `validators.ts` file that sets up a validator for data and querys (for which string types will be coerced automatically). It also sets up a collection of additional formats using [ajv-formats](https://ajv.js.org/packages/ajv-formats.html). The validators in this file can be customized according to the [Ajv documentation](https://ajv.js.org/) and [its plugins](https://ajv.js.org/packages/). You can find the available Ajv options in the [Ajs class API docs](https://ajv.js.org/options.html).
17
+
The following is the standard `validators.ts` file that sets up a validator for data and querys (for which string types will be coerced automatically). It also sets up a collection of additional formats using [ajv-formats](https://ajv.js.org/packages/ajv-formats.html). The validators in this file can be customized according to the [Ajv documentation](https://ajv.js.org/) and [its plugins](https://ajv.js.org/packages/). You can find the available Ajv options in the [Ajv class API docs](https://ajv.js.org/options.html).
Copy file name to clipboardExpand all lines: docs/guides/basics/schemas.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,9 @@ While schemas and resolvers can be used outside of a Feather application, you wi
30
30
-**Query** schemas and resolvers validate and convert the query string and can also be used for additional limitations like only allowing a user to see and modify their own data
31
31
-**External** resolvers that return a safe version of the data (e.g. hiding a users password) that can be sent to external clients
32
32
33
+
<hr />
34
+
<DatabaseSelect />
35
+
33
36
## Adding a user avatar
34
37
35
38
Let's extend our existing users schema to add an `avatar` property so that our users can have a profile image.
@@ -55,7 +58,7 @@ import type { Static } from '@feathersjs/typebox'
55
58
import { passwordHash } from '@feathersjs/authentication-local'
56
59
57
60
import type { HookContext } from '../../declarations'
58
-
import { dataValidator, queryValidator } from '../../schemas/validators'
61
+
import { dataValidator, queryValidator } from '../../validators'
59
62
60
63
// Main data model schema
61
64
export const userSchema = Type.Object(
@@ -133,7 +136,7 @@ import type { Static } from '@feathersjs/typebox'
133
136
import { passwordHash } from '@feathersjs/authentication-local'
134
137
135
138
import type { HookContext } from '../../declarations'
136
-
import { dataValidator, queryValidator } from '../../schemas/validators'
139
+
import { dataValidator, queryValidator } from '../../validators'
0 commit comments