mini-effect
    Preparing search index...

    Interface IsoTimestampAction<TInput$1, TMessage>

    ISO timestamp action interface.

    interface IsoTimestampAction<
        TInput$1 extends string,
        TMessage extends ErrorMessage<IsoTimestampIssue<TInput$1>> | undefined,
    > {
        "~run": (
            dataset: OutputDataset<TInput$1, BaseIssue<unknown>>,
            config: Config<BaseIssue<unknown>>,
        ) => OutputDataset<
            TInput$1,
            BaseIssue<unknown>
            | IsoTimestampIssue<TInput$1>,
        >;
        "~types"?: { input: TInput$1; issue: IsoTimestampIssue; output: TInput$1 };
        async: false;
        expects: null;
        kind: "validation";
        message: TMessage;
        reference: {
            <TInput$1 extends string>(): IsoTimestampAction<TInput$1, undefined>;
            <
                TInput$1 extends string,
                const TMessage extends
                    ErrorMessage<IsoTimestampIssue<TInput$1>> | undefined,
            >(
                message: TMessage,
            ): IsoTimestampAction<TInput$1, TMessage>;
        };
        requirement: RegExp;
        type: "iso_timestamp";
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    "~run": (
        dataset: OutputDataset<TInput$1, BaseIssue<unknown>>,
        config: Config<BaseIssue<unknown>>,
    ) => OutputDataset<
        TInput$1,
        BaseIssue<unknown>
        | IsoTimestampIssue<TInput$1>,
    >

    Validates known input values.

    Type Declaration

    "~types"?: { input: TInput$1; issue: IsoTimestampIssue; output: TInput$1 }

    The input, output and issue type.

    async: false

    Whether it's async.

    expects: null

    The expected property.

    kind: "validation"

    The object kind.

    message: TMessage

    The error message.

    reference: {
        <TInput$1 extends string>(): IsoTimestampAction<TInput$1, undefined>;
        <
            TInput$1 extends string,
            const TMessage extends
                ErrorMessage<IsoTimestampIssue<TInput$1>> | undefined,
        >(
            message: TMessage,
        ): IsoTimestampAction<TInput$1, TMessage>;
    }

    The action reference.

    Type Declaration

      • <TInput$1 extends string>(): IsoTimestampAction<TInput$1, undefined>
      • Creates an ISO timestamp validation action.

        Formats:

        • yyyy-mm-ddThh:mm:ss.sssZ
        • yyyy-mm-ddThh:mm:ss.sss±hh:mm
        • yyyy-mm-ddThh:mm:ss.sss±hhmm

        Hint: To support timestamps with lower or higher accuracy, the millisecond specification can be removed or contain up to 9 digits.

        Hint: The regex used cannot validate the maximum number of days based on year and month. For example, "2023-06-31T00:00:00.000Z" is valid although June has only 30 days.

        Hint: The regex also allows a space as a separator between the date and time parts instead of the "T" character.

        Type Parameters

        • TInput$1 extends string

        Returns IsoTimestampAction<TInput$1, undefined>

        An ISO timestamp action.

      • <
            TInput$1 extends string,
            const TMessage extends
                ErrorMessage<IsoTimestampIssue<TInput$1>> | undefined,
        >(
            message: TMessage,
        ): IsoTimestampAction<TInput$1, TMessage>
      • Creates an ISO timestamp validation action.

        Formats:

        • yyyy-mm-ddThh:mm:ss.sssZ
        • yyyy-mm-ddThh:mm:ss.sss±hh:mm
        • yyyy-mm-ddThh:mm:ss.sss±hhmm
        • yyyy-mm-ddThh:mm:ss.sss±hh

        Hint: To support timestamps with lower or higher accuracy, the millisecond specification can be removed or contain up to 9 digits.

        Hint: The regex used cannot validate the maximum number of days based on year and month. For example, "2023-06-31T00:00:00.000Z" is valid although June has only 30 days.

        Hint: The regex also allows a space as a separator between the date and time parts instead of the "T" character.

        Type Parameters

        Parameters

        • message: TMessage

          The error message.

        Returns IsoTimestampAction<TInput$1, TMessage>

        An ISO timestamp action.

    requirement: RegExp

    The ISO timestamp regex.

    type: "iso_timestamp"

    The action type.