Guaxu Docs
    Preparing search index...

    Variable formSchemaConst

    formSchema: {
        requiredDate: (
            message?: string,
        ) => ZodEffects<ZodNullable<ZodString>, string, string | null>;
        requiredString: (message?: string) => ZodString;
    } = ...

    Type Declaration

    • requiredDate: (message?: string) => ZodEffects<ZodNullable<ZodString>, string, string | null>

      A required ISO date string field.

      We need to make this nullable and then refine it because the default state of the DatePicker (no date selected) is null. The .refine() rejects null to enforce the field as required.

    • requiredString: (message?: string) => ZodString

      A required string field that trims whitespace and rejects empty strings.

      We need this because Zod's s.string() does not reject empty strings by default, and form fields are initialized with '' as the default value to avoid short-circuiting object-level refinements.