FieldConstraint · Node.js
Describe a field name, its type and whether it is required.
In this guide
Purpose and lifecycle
Node stores readonly name, fieldType and required properties. Python wraps a native constraint and exposes properties.
DatasetSchema.addField/add_field accepts these three values directly; it does not accept a FieldConstraint object.
Definition and availability
Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.
Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.
export class FieldConstraintMembers
| Member | Kind | Return / value type | Source status |
|---|---|---|---|
| name | property | string | Present in source |
| fieldType | property | FieldType | Present in source |
| required | property | boolean | Present in source |
| constructor | method | FieldConstraint | Present in source |
name
Unique field name or context-specific item name.
Returns / value: string.
public readonly name: string;fieldType
Read the declared value. Its exact type is shown in the signature.
Returns / value: FieldType.
public readonly fieldType: FieldType;required
Reject empty/whitespace-only required fields; default false for job fields.
Returns / value: boolean.
public readonly required: boolean;constructor()
Store a field name, FieldType and required flag. Pass those values to DatasetSchema.addField/add_field to apply validation.
Returns / value: FieldConstraint.
constructor(name: string, fieldType: FieldType, required: boolean): FieldConstraint| Parameter | Type | Required / default | Meaning |
|---|---|---|---|
| name | string | Required | Field, header or attribute name for this operation. |
| fieldType | FieldType | Required | A FieldType enum member. |
| required | boolean | Required | Whether an empty or missing field is rejected. |
Errors and operational limits
Invalid native type arguments may raise a binding error.
Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.