Skip to content

Interface: Extension ​

Properties ​

PropertyTypeDescription
base?Schema_2<any>-
cast?Record<string, { from: any; to: any; }>undocumented options
coerce?| CoerceFunction | CoerceObject-
flags?Record<string, ExtensionFlag>-
manifest?{ build?: any; }-
manifest.build?any-
messages?string | LanguageMessages-
modifiers?Record<string, (rule: any, enabled?: boolean) => any>-
overrides?Record<string, (value: any) => Schema_2>-
properties?Record<string, any>-
rules?Record<string, ExtensionRule & ThisType<SchemaInternals>>-
terms?Record<string, ExtensionTerm>-
typestring | RegExp-

Methods ​

args()? ​

ts
optional args(...args: SchemaLike_2<any>[]): Schema_2;

Parameters ​

ParameterType
...argsSchemaLike_2<any>[]

Returns ​

Schema_2


prepare()? ​

ts
optional prepare(value: any, helpers: CustomHelpers): any;

Parameters ​

ParameterType
valueany
helpersCustomHelpers

Returns ​

any


rebuild()? ​

ts
optional rebuild(schema: ExtensionBoundSchema): void;

Parameters ​

ParameterType
schemaExtensionBoundSchema

Returns ​

void


validate()? ​

ts
optional validate(value: any, helpers: CustomHelpers): any;

Parameters ​

ParameterType
valueany
helpersCustomHelpers

Returns ​

any