AxFluentFieldType
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L188
Type Parameters
| Type Parameter | Default type |
|---|---|
TType extends AxFieldType["type"] | AxFieldType["type"] |
TIsArray extends boolean | false |
TOptions extends readonly string[] | undefined | undefined |
TIsOptional extends boolean | false |
TIsInternal extends boolean | false |
TFields extends | Record<string, | AxFluentFieldInfo | AxFluentFieldType> | undefined | undefined |
Implements
Constructors
Constructor
new AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>(fieldType: object): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L214
Parameters
| Parameter | Type |
|---|---|
fieldType | { description?: string; fields?: TFields; format?: string; isArray: TIsArray; isInternal: TIsInternal; isOptional: TIsOptional; maximum?: number; maxLength?: number; minimum?: number; minLength?: number; options?: TOptions; pattern?: string; patternDescription?: string; type: TType; } |
fieldType.description? | string |
fieldType.fields? | TFields |
fieldType.format? | string |
fieldType.isArray | TIsArray |
fieldType.isInternal | TIsInternal |
fieldType.isOptional | TIsOptional |
fieldType.maximum? | number |
fieldType.maxLength? | number |
fieldType.minimum? | number |
fieldType.minLength? | number |
fieldType.options? | TOptions |
fieldType.pattern? | string |
fieldType.patternDescription? | string |
fieldType.type | TType |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
Properties
Methods
array()
array(desc?: string): AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L260
Parameters
| Parameter | Type |
|---|---|
desc? | string |
Returns
AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields>
date()
date(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L414
Set date format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
datetime()
datetime(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L434
Set datetime format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
email()
email(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L348
Set email format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
internal()
internal(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L277
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields>
max()
max(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L321
Set maximum value for numbers or maximum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
min()
min(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L294
Set minimum value for numbers or minimum length for strings
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
optional()
optional(): AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L246
Returns
AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields>
regex()
regex(pattern: string, description: string): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L390
Set regex pattern validation for strings
Parameters
| Parameter | Type | Description |
|---|---|---|
pattern | string | Regular expression pattern to match |
description | string | Human-readable description of what the pattern validates (e.g., “Must be a valid username with only lowercase letters, numbers, and underscores”) |
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>
url()
url(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/dsp/sig.ts#L368
Set URL/URI format validation for strings
Returns
AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields>