-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
status: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet
Description
Describe the Bug
Validate of rich text field provides props that are not compatible by type with default richText validator function.
It is only type issue.
validate: (value, args) => {
return richText(value, args)
}Argument of type
ValidateOptions<any, any, object, any>
is not assignable to parameter of type
ValidateOptions<unknown, unknown, RichTextField, object>
. Property type is missing in type
BaseValidateOptions<any, any, any>
but required in type
{ admin?: ({ components?: ({ afterInput?: CustomComponent[] | undefined; beforeInput?: CustomComponent[] | undefined; Error?: CustomComponent | undefined; Label?: CustomComponent | undefined; } & { ...; }) | undefined; } & FieldAdmin) | undefined; editor?: RichTextAdapter<...> | ... 1 more ... | undefined; maxDepth?...
. (ts 2345)
Link to the code that reproduces this issue
Provided above
Reproduction Steps
- Create rich text field
- Add validation
- Inside there use default richText validator
- Pass props
Which area(s) are affected?
area: core
Environment Info
Binaries:
Node: 23.7.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.69.0
next: 15.4.10
@payloadcms/db-mongodb: 3.69.0
@payloadcms/graphql: 3.69.0
@payloadcms/next/utilities: 3.69.0
@payloadcms/richtext-lexical: 3.69.0
@payloadcms/translations: 3.69.0
@payloadcms/ui/shared: 3.69.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Available memory (MB): 32720
Available CPU cores: 12
akhrarovsaid
Metadata
Metadata
Assignees
Labels
status: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet