@yamlresume/node
    Preparing search index...

    Function validateResume

    • Validates a YAML string against a Zod schema and returns errors.

      Parameters

      • yamlStr: string

        The YAML string to validate.

      • schema: ZodObject<
            {
                content: ZodObject<
                    {
                        awards: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            awarder: ZodString;
                                            date: ZodOptional<ZodNullable<(...)>>;
                                            summary: ZodOptional<ZodNullable<(...)>>;
                                            title: ZodString;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        basics: ZodObject<
                            {
                                email: ZodOptional<
                                    ZodNullable<
                                        ZodType<string, unknown, $ZodTypeInternals<string, unknown>>,
                                    >,
                                >;
                                headline: ZodOptional<
                                    ZodNullable<
                                        ZodType<string, unknown, $ZodTypeInternals<string, unknown>>,
                                    >,
                                >;
                                name: ZodString;
                                phone: ZodOptional<
                                    ZodNullable<
                                        ZodType<string, unknown, $ZodTypeInternals<string, unknown>>,
                                    >,
                                >;
                                summary: ZodOptional<
                                    ZodNullable<
                                        ZodType<string, unknown, $ZodTypeInternals<string, unknown>>,
                                    >,
                                >;
                                url: ZodOptional<
                                    ZodNullable<
                                        ZodType<string, unknown, $ZodTypeInternals<string, unknown>>,
                                    >,
                                >;
                            },
                            $strip,
                        >;
                        certificates: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            date: ZodOptional<ZodNullable<(...)>>;
                                            issuer: ZodString;
                                            name: ZodString;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        education: ZodArray<
                            ZodObject<
                                {
                                    area: ZodString;
                                    courses: ZodOptional<
                                        ZodNullable<
                                            ZodType<(...)[], unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                    degree: ZodEnum<
                                        {
                                            Associate: "Associate";
                                            Bachelor: "Bachelor";
                                            Diploma: "Diploma";
                                            Doctor: "Doctor";
                                            "High School": "High School";
                                            Master: "Master";
                                            "Middle School": "Middle School";
                                        },
                                    >;
                                    endDate: ZodOptional<
                                        ZodNullable<
                                            ZodType<string, unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                    institution: ZodString;
                                    score: ZodOptional<
                                        ZodNullable<
                                            ZodType<string, unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                    startDate: ZodOptional<
                                        ZodNullable<
                                            ZodType<string, unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                    summary: ZodOptional<
                                        ZodNullable<
                                            ZodType<string, unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                    url: ZodOptional<
                                        ZodNullable<
                                            ZodType<string, unknown, $ZodTypeInternals<(...), (...)>>,
                                        >,
                                    >;
                                },
                                $strip,
                            >,
                        >;
                        interests: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        { keywords: ZodOptional<ZodNullable<(...)>>; name: ZodString },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        languages: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            fluency: ZodEnum<
                                                {
                                                    "Elementary Proficiency": ...;
                                                    "Full Professional Proficiency": ...;
                                                    "Limited Working Proficiency": ...;
                                                    "Minimum Professional Proficiency": ...;
                                                    "Native or Bilingual Proficiency": ...;
                                                },
                                            >;
                                            keywords: ZodOptional<ZodNullable<(...)>>;
                                            language: ZodEnum<
                                                {
                                                    Afrikaans: ...;
                                                    Albanian: ...;
                                                    Amharic: ...;
                                                    Arabic: ...;
                                                    Azerbaijani: ...;
                                                    Belarusian: ...;
                                                    Bengali: ...;
                                                    Bhojpuri: ...;
                                                    Bulgarian: ...;
                                                    Burmese: ...;
                                                    Cantonese: ...;
                                                    Catalan: ...;
                                                    Chinese: ...;
                                                    Croatian: ...;
                                                    Czech: ...;
                                                    Danish: ...;
                                                    Dutch: ...;
                                                    English: ...;
                                                    Estonian: ...;
                                                    Farsi: ...;
                                                    Filipino: ...;
                                                    Finnish: ...;
                                                    French: ...;
                                                    German: ...;
                                                    Greek: ...;
                                                    Gujarati: ...;
                                                    Hausa: ...;
                                                    Hebrew: ...;
                                                    Hindi: ...;
                                                    Hungarian: ...;
                                                    Icelandic: ...;
                                                    Igbo: ...;
                                                    Indonesian: ...;
                                                    Irish: ...;
                                                    Italian: ...;
                                                    Japanese: ...;
                                                    Javanese: ...;
                                                    Kazakh: ...;
                                                    Khmer: ...;
                                                    Korean: ...;
                                                    Lahnda: ...;
                                                    Latvian: ...;
                                                    Lithuanian: ...;
                                                    Malay: ...;
                                                    Mandarin: ...;
                                                    Marathi: ...;
                                                    Nepali: ...;
                                                    Norwegian: ...;
                                                    Oromo: ...;
                                                    Pashto: ...;
                                                    Polish: ...;
                                                    Portuguese: ...;
                                                    Romanian: ...;
                                                    Russian: ...;
                                                    Serbian: ...;
                                                    Shona: ...;
                                                    Sinhala: ...;
                                                    Slovak: ...;
                                                    Slovene: ...;
                                                    Somali: ...;
                                                    Spanish: ...;
                                                    Sundanese: ...;
                                                    Swahili: ...;
                                                    Swedish: ...;
                                                    Tagalog: ...;
                                                    Tamil: ...;
                                                    Telugu: ...;
                                                    Thai: ...;
                                                    Turkish: ...;
                                                    Ukrainian: ...;
                                                    Urdu: ...;
                                                    Uzbek: ...;
                                                    Vietnamese: ...;
                                                    Yoruba: ...;
                                                    Zulu: ...;
                                                },
                                            >;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        location: ZodOptional<
                            ZodNullable<
                                ZodObject<
                                    {
                                        address: ZodOptional<ZodNullable<ZodType<(...), (...), (...)>>>;
                                        city: ZodString;
                                        country: ZodOptional<ZodNullable<ZodType<(...), (...), (...)>>>;
                                        postalCode: ZodOptional<ZodNullable<ZodType<(...), (...), (...)>>>;
                                        region: ZodOptional<ZodNullable<ZodType<(...), (...), (...)>>>;
                                    },
                                    $strip,
                                >,
                            >,
                        >;
                        profiles: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            network: ZodEnum<
                                                {
                                                    Behance: ...;
                                                    Discord: ...;
                                                    Dribbble: ...;
                                                    Facebook: ...;
                                                    GitHub: ...;
                                                    Gitlab: ...;
                                                    Instagram: ...;
                                                    Line: ...;
                                                    LinkedIn: ...;
                                                    Medium: ...;
                                                    Pinterest: ...;
                                                    Reddit: ...;
                                                    Snapchat: ...;
                                                    "Stack Overflow": ...;
                                                    Telegram: ...;
                                                    TikTok: ...;
                                                    Twitch: ...;
                                                    Twitter: ...;
                                                    Vimeo: ...;
                                                    WeChat: ...;
                                                    Weibo: ...;
                                                    WhatsApp: ...;
                                                    YouTube: ...;
                                                    Zhihu: ...;
                                                },
                                            >;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                            username: ZodString;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        projects: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            description: ZodOptional<ZodNullable<(...)>>;
                                            endDate: ZodOptional<ZodNullable<(...)>>;
                                            keywords: ZodOptional<ZodNullable<(...)>>;
                                            name: ZodString;
                                            startDate: ZodString;
                                            summary: ZodString;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        publications: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            name: ZodString;
                                            publisher: ZodString;
                                            releaseDate: ZodOptional<ZodNullable<(...)>>;
                                            summary: ZodOptional<ZodNullable<(...)>>;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        references: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            email: ZodOptional<ZodNullable<(...)>>;
                                            name: ZodString;
                                            phone: ZodOptional<ZodNullable<(...)>>;
                                            relationship: ZodOptional<ZodNullable<(...)>>;
                                            summary: ZodString;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        skills: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            keywords: ZodOptional<ZodNullable<(...)>>;
                                            level: ZodEnum<
                                                {
                                                    Advanced: ...;
                                                    Beginner: ...;
                                                    Expert: ...;
                                                    Intermediate: ...;
                                                    Master: ...;
                                                    Novice: ...;
                                                },
                                            >;
                                            name: ZodString;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        volunteer: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            endDate: ZodOptional<ZodNullable<(...)>>;
                                            organization: ZodString;
                                            position: ZodString;
                                            startDate: ZodString;
                                            summary: ZodString;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                        work: ZodOptional<
                            ZodNullable<
                                ZodArray<
                                    ZodObject<
                                        {
                                            endDate: ZodOptional<ZodNullable<(...)>>;
                                            keywords: ZodOptional<ZodNullable<(...)>>;
                                            name: ZodString;
                                            position: ZodString;
                                            startDate: ZodString;
                                            summary: ZodString;
                                            url: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                >,
                            >,
                        >;
                    },
                    $strip,
                >;
                layouts: ZodOptional<
                    ZodNullable<
                        ZodArray<
                            ZodDiscriminatedUnion<
                                [
                                    ZodObject<
                                        {
                                            advanced: ZodOptional<ZodNullable<(...)>>;
                                            engine: ZodLiteral<"docx">;
                                            page: ZodOptional<ZodNullable<(...)>>;
                                            sections: ZodOptional<ZodNullable<(...)>>;
                                            template: ZodOptional<ZodNullable<(...)>>;
                                            typography: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                    ZodObject<
                                        {
                                            advanced: ZodOptional<ZodNullable<(...)>>;
                                            engine: ZodLiteral<"html">;
                                            sections: ZodOptional<ZodNullable<(...)>>;
                                            template: ZodOptional<ZodNullable<(...)>>;
                                            typography: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                    ZodObject<
                                        {
                                            advanced: ZodOptional<ZodNullable<(...)>>;
                                            engine: ZodLiteral<"latex">;
                                            page: ZodOptional<ZodNullable<(...)>>;
                                            sections: ZodOptional<ZodNullable<(...)>>;
                                            template: ZodOptional<ZodNullable<(...)>>;
                                            typography: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                    ZodObject<
                                        {
                                            engine: ZodLiteral<"markdown">;
                                            sections: ZodOptional<ZodNullable<(...)>>;
                                        },
                                        $strip,
                                    >,
                                ],
                                "engine",
                            >,
                        >,
                    >,
                >;
                locale: ZodOptional<
                    ZodNullable<
                        ZodObject<
                            {
                                language: ZodOptional<
                                    ZodNullable<
                                        ZodType<
                                            | "en"
                                            | "zh-hans"
                                            | "zh-hant-hk"
                                            | "zh-hant-tw"
                                            | "es"
                                            | "fr"
                                            | "no"
                                            | "nl"
                                            | "ja"
                                            | "de"
                                            | "id"
                                            | "pt-br",
                                            unknown,
                                            $ZodTypeInternals<
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...)
                                                | (...),
                                                unknown,
                                            >,
                                        >,
                                    >,
                                >;
                            },
                            $strip,
                        >,
                    >,
                >;
            },
            $strip,
        >

        The Zod schema to validate against.

      Returns PositionalError[]

      A list of positional errors, or an empty array if validation is successful.