validateSegment
function validateSegment(input, basePath?): ValidationResult;Defined in: validation.ts:473
Validate a single reusable Segment: structure + inSegment value checks.
Cross-entity reference/cycle checks live in ./segments.validateSegmentReferences.
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
input |
unknown |
undefined |
basePath? |
string |
"segment" |
Returns
Section titled “Returns”Example
Section titled “Example”import { validateSegment } from "@xtandard/flags";
const result = validateSegment({ key: "eu-beta", conditions: [{ attribute: "country", operator: "in", value: ["FR", "DE"] }],});// result.valid === true