Skip to content

Commit 2ea56fe

Browse files
authored
fix(docs): update import path for validation functions for fields (#7392)
1 parent ea16119 commit 2ea56fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/fields/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ When using custom validation functions, Payload will use yours in place of the d
294294
To reuse default field validations, call them from within your custom validation function:
295295

296296
```ts
297-
import { text } from 'payload/fields/validations'
297+
import { text } from 'payload/shared'
298298

299299
const field: Field = {
300300
name: 'notBad',

docs/fields/relationship.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ You can learn more about writing queries [here](/docs/queries/overview).
193193
When a relationship field has both <strong>filterOptions</strong> and a custom{' '}
194194
<strong>validate</strong> function, the api will not validate <strong>filterOptions</strong>{' '}
195195
unless you call the default relationship field validation function imported from{' '}
196-
<strong>payload/fields/validations</strong> in your validate function.
196+
<strong>payload/shared</strong> in your validate function.
197197
</Banner>
198198

199199
## How the data is saved

docs/fields/upload.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,5 @@ You can learn more about writing queries [here](/docs/queries/overview).
123123
When an upload field has both <strong>filterOptions</strong> and a custom{' '}
124124
<strong>validate</strong> function, the api will not validate <strong>filterOptions</strong>{' '}
125125
unless you call the default upload field validation function imported from{' '}
126-
<strong>payload/fields/validations</strong> in your validate function.
126+
<strong>payload/shared</strong> in your validate function.
127127
</Banner>

0 commit comments

Comments
 (0)