effect-io-ai

Package: effect
Module: Schema

Schema.isPattern

Validates that a string matches the specified regular expression pattern.

Details

JSON Schema:

This check corresponds to the pattern constraint in JSON Schema.

Arbitrary:

When generating test data with fast-check, this applies a patterns constraint to ensure generated strings match the specified RegExp pattern.

Signature

declare const isPattern: (regExp: globalThis.RegExp, annotations?: Annotations.Filter) => SchemaAST.Filter<string>

Source

Since v4.0.0