Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

If a task’s priority is stored as null, an edit schema that converts only undefined to an empty string can still reject the task when the form loads. Those values are different in JavaScript, and Zod’s optional and nullable schemas accept different inputs. The reported case was a single developer’s account, not evidence of a widespread defect.

Why an empty-looking priority can fail validation

A form control that looks empty does not tell you what value reached your schema. An absent object key, undefined, null, and the empty string "" are distinct states. A database read can supply null even if the user never selected a priority.

In a report published September 17, 2026, a task created without a priority was read back with priority: null. The edit schema used preprocessing that checked for undefined and converted that case to "", then validated against the enum LOW, MEDIUM, HIGH, or URGENT. Since the value was actually null, the preprocessing branch did not run, and the enum received a value it did not accept. The author reported correcting the check to handle null and map it to an empty string. Read the reported example.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Zod accepts: optional, nullable, and nullish

Zod distinguishes the values explicitly: .optional() permits undefined, .nullable() permits null, and .nullish() permits both. These wrappers do not make an enum accept every representation of an empty value. See the Zod schema API.

#1 Best Overall
To Do List Notepad with Multiple Functional Sections, Spiral Daily Planner
  • Ultimate To Do List with Multiple Sections: A to do list lover’s dream, our notepad offers multiple sections with ample space to write all your important tasks so you can organize and track your tasks better than with a regular list. Each page has a to do list as well as sections for top priorities, for tomorrow, and appointments/calls, making it easy to prioritize and stay organized. Say goodbye to feeling overwhelmed and hello to a more organized and productive you!
  • Minimalist Design to Boost Productivity: Experience the perfect balance of minimalist and functional design with our daily to-do list notepad. Each notepad measures 6.5” x 9.8” and has 60 sheets, so there is enough space to write down everything you need to do. Featuring a minimalist black and white design and premium materials, our notepad is the perfect tool to keep you on track and motivated throughout the day!
  • Spiral Bound with Protective Cover: Our twin spiral-bound notepad lets you start a new page while keeping old ones for reference. It makes it easy to flip through your to-do list. When you're done, do you want to remove your lists? No issue! They can be torn out as necessary. When you're on the go, the plastic cover on our notepad protects the pages from spills, scratches, and tears. Even better, the cover is see-through so you can quickly glance at your to-do list page as you go about your day.
  • Premium, non-bleed pages: No more frustrations about pens or markers bleeding through flimsy paper! Our notepad is made with premium non-bleed 100 gsm paper to give you the best writing experience. Unlike with our competitors, these pages won’t bleed onto the next one, even if you write with a permanent marker.
  • Sturdy Backing for Writing Anywhere: Our notepad is made with a thick backing that provides a sturdy surface for writing anytime, so you can take it on the go and never miss an important task again. Whether you're at home, in the office, or on the go, you'll always be able to capture your thoughts and stay on top of your daily routine.
  • z.enum(["LOW", "MEDIUM", "HIGH", "URGENT"]).optional() allows an undefined value, but does not by itself allow null.
  • z.enum(["LOW", "MEDIUM", "HIGH", "URGENT"]).nullable() allows null, but does not by itself allow undefined.
  • z.enum(["LOW", "MEDIUM", "HIGH", "URGENT"]).nullish() permits both null and undefined in addition to valid enum values.

Use the wrapper that matches the field’s contract. If null means “no priority,” nullable acceptance may be appropriate. If absence and null are both valid inputs, nullish acceptance may fit. If the form should have one canonical representation, normalize at a deliberate boundary. Do not broaden acceptance without deciding what each state means.

Choose a repair that preserves the field’s meaning

Approach What it accepts or does Decision to make
Make the schema nullable Accepts null alongside valid enum values. Is null a valid domain value?
Make the schema nullish Accepts null, undefined, and valid enum values. Should both explicit null and absence be accepted, and how will they be handled later?
Preprocess null to an empty string Maps null to "" before the inner schema runs. Does an empty string represent “no priority,” and does the inner schema accept that normalized value?
Normalize or omit the field at the API boundary Applies the client-server contract you define. Does omission mean “leave unchanged” while null means “clear,” or do they mean something else in this application?

The reported fix belongs to the third approach: it checks for null and maps it to an empty string. That mapping only works if the schema after preprocessing accepts the empty string—for example, by treating it as an allowed no-priority state or transforming it appropriately. Otherwise, the preprocessor changes the failure from a null rejection to an empty-string rejection.

Rank #2
Sale
Beautiful Daily Planner And Notebook With Hourly Schedule - Spiral Notebook
  • Easily Stay On Track & Make The Most of Your Time: ZICOTOs’ daily planner makes it easier than ever for you to stay organized, reduce stress & enjoy more free time! Arrange your schedule, priorities, to do’s and jot down plans & ideas on the daily notes section
  • Smartly Plan Ahead & Boost Your Productivity: Absolutely clever & efficient! With the planner notebook you can break down your daily tasks into half-hourly focus blocks and map out priorities & follow-up duties to keep your day on track and enhance productivity
  • Plenty Of Space For Efficient Planning: Stay focused & manage your time wisely! The 9.3x6.3” (inner pages) work planner & organizer notebook offers ample space for 80 days of life-changing planning with each day being spread across 2 pages - set yourself up for purposeful days
  • Now Is The Best Time To Start: The daily planner is undated so you can start to add structure to your schedule and cultivate new planning habits right away! Beat procrastination, boost happiness & make each day count with the hourly planner
  • Adds Beauty To Daily Planning: A gorgeous champagne pink cover, chic gold foil letters, a golden ring wire and a clean, easy-to-use layout - enjoy the gorgeous and modern minimalist design of the undated daily planner!

For edit requests, decide whether an omitted priority means “leave unchanged” and an explicit null means “clear it,” or whether your API uses a different contract. This is a design choice, not a universal Zod or database rule. Keep the client, schema, and update handler consistent with the chosen meaning.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Trace the value through the edit flow

Debug the actual values rather than inferring them from the appearance of the field. Follow the record from storage to validation and then through the update operation.

Rank #3
Task Planner & Activity Log Notepad for Work, Daily To Do List with Checklist, Time Tracking & Notes, 60 Pages, 8.5 x 11 Letter, Portrait – Life Charge
  • TASK PLANNER NOTEPAD FOR WORK – Structured task planner and productivity planner designed as a task organizer and workflow planner with expanded layout
  • REDUCE OVERWHELM & IMPROVE EXECUTION – Use this task planner, productivity planner, and task tracker to organize workflow and improve execution
  • TASK PLANNING + ACTIVITY TRACKING IN ONE FORMAT – Use as a productivity planner, task organizer, and workflow planner to manage tasks and execution
  • ANALOG TASK & ACTIVITY SYSTEM THAT WORKS – Writing tasks improves memory and reduces missed steps
  • STRUCTURED CHECKLIST + LOG FORMAT – Combines task planning and activity tracking with expanded space for detailed workflow management
  1. Load a record with no priority. Inspect the fetched object and determine whether the property is null, undefined, omitted, or "".
  2. Check the form’s default and submitted values. Inspect the form state and actual request payload. A control that looks blank does not establish which value the form library or client sends.
  3. Run the edit input through the edit schema. Test the exact schema used for editing, not just the create schema. If preprocessing or transforms are involved, compare the input with the parsed output.
  4. Inspect update behavior. Confirm whether the server writes null, skips an omitted field, or applies a default. Verify that this behavior matches the API contract.
  5. Cover each relevant case. Test null, undefined or an omitted key, the empty string, and each valid enum value. Make create and edit rules intentionally consistent—or document why they differ.

This walkthrough is a debugging method, not a claim that those tests were performed in the reported account. The published report does not identify the database engine, form library, Zod version, or other implementation details.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep create and edit contracts deliberate

A create form and an edit form can legitimately treat an unset field differently: a create request may omit a value, while an existing database row may return explicit null. That difference should be visible in the schema and update semantics, not hidden behind an assumption that every empty state is interchangeable.

Rank #4
Taja To Do List Notepad, Undated Daily Planner for Work and Goal Setting
  • Stay Organized with Ease: Our To Do List Notepad provides multiple sections with plenty of space to jot down all of your important tasks.A versatile office supply perfect for daily task management, helping you keep track of everything that needs to be done and prioritize effectively.
  • Achieve Your Productivity Goals: Begin each day on a positive note, reminding you of your potential, strength, and the significance of staying focused on your goals. Our Daily Checklist Notepad is the ultimate tool to streamline your daily planning and elevate your productivity. With a clear and concise overview of your tasks, you can effortlessly prioritize what truly matters and make consistent strides towards achieving your goals.
  • Reliable and Stylish: Our to do list planner combines functionality with durability. With a transparent PP cover, the inner pages are well-protected from dirt and wear. Additionally, the back cover is crafted with thick paperboard, offering a stable surface for your writing needs. Each notepad includes 52 pages of high-quality, 100gsm paper, which is thick and non-bleeding, resulting in a smooth and enjoyable writing experience.
  • Versatile Use: This daily checklist notepad, suitable for teacher supplies and a wide range of applications, proves invaluable in various settings including work, school, and home. Whether you need to organize your daily tasks, plan a project, or create a grocery list, this notepad serves as the ideal tool. Its compact size ensures easy portability, allowing you to conveniently carry it with you throughout your day.
  • Perfect Present for Anyone: Our Daily To-Do List Notepad is the perfect present for those who value organization and productivity. With its stylish design and versatility, this office desk accessory is also a practical addition to school supplies. Suitable for students, professionals, and homemakers alike, it helps keep tasks and priorities in check effortlessly.

For a robust contract, specify the accepted input states and what each means before choosing preprocessing or a Zod wrapper. Then verify that the database read, form defaults, submitted payload, schema, and update handler all implement that same contract.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Life Charge Weekly Planner Notepad for Work & Home, Weekly To Do List Pad with Daily Checklist, Priority & Notes, 60 Pages, 8.5 x 11 Letter, Landscape
  • WEEKLY PLANNER NOTEPAD FOR WORK & HOME – Structured weekly planner pad and weekly to do list designed as a weekly checklist planner for desk planning
  • PLAN YOUR WEEK CLEARLY – Use this weekly to do list and weekly planner pad to organize priorities and manage workflow across the week
  • WEEKLY TASK ORGANIZER FOR WORK, HOME & PROJECTS – Manage schedules and workflow using a structured weekly planner and productivity planner system
  • ANALOG WEEKLY PLANNING THAT WORKS – Written planning reinforces memory and improves follow-through
  • PRIORITY + CHECKLIST SYSTEM FOR WEEKLY PLANNING – Structured weekly layout supports task organization, scheduling, and workflow management

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.