jmap-kit
    Preparing search index...

    Variable mailboxSetValidationPluginConst

    mailboxSetValidationPlugin: ValidationPlugin<
        "invocation",
        MailboxSetRequestInvocationArgs,
    > = ...

    Validates server-defined constraints for Mailbox/set operations.

    This plugin enforces account-specific mailbox creation limits defined in the Email capability:

    Mailbox Name Length (RFC 8621 Section 2.2):

    • Validates that mailbox names do not exceed maxSizeMailboxName octets (UTF-8 encoded)
    • The limit is server-defined and specified in the account's Email capability object
    • Prevents creation attempts that would be rejected by the server

    Top-Level Mailbox Creation (RFC 8621 Section 2.2):

    • Checks the mayCreateTopLevelMailbox server capability
    • Prevents attempts to create mailboxes with parentId: null when the server prohibits it
    • This restriction varies by server implementation and account type

    These validations catch client errors before sending requests to the server, providing immediate feedback and avoiding unnecessary network round-trips.