Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change Site Theme
Sanity logo

Documentation

    • Overview
    • Platform introduction
    • Next.js quickstart
    • Nuxt.js quickstart
    • Astro quickstart
    • React Router quickstart
    • Studio quickstart
    • Build with AI
    • Content Lake
    • Functions
    • APIs and SDKs
    • Agent Actions
    • Visual Editing
    • Blueprints
    • Platform management
    • Dashboard
    • Studio
    • Canvas
    • Media Library
    • App SDK
    • Content Agent
    • HTTP API
    • CLI
    • Libraries
    • Specifications
    • Changelog
    • User guides
    • Developer guides
    • Courses and certifications
    • Join the community
    • Templates

Changelog

Track new features, improvements, and fixes across all Sanity products.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Changelog

Track new features, improvements, and fixes across all Sanity products.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

On this page

Filter by product

Filter by product

Apps
  • 6
  • 1
  • 18
  • 1
  • 6
  • 7
  • 6
  • 14
  • 3
  • 310
  • 2
  • 1
Integrations & Libraries
  • 15
  • 6
  • 2
  • 4
  • 2
  • 2
  • 9
  • 1
  • 1
  • 1
  • 6
  • 9
  • 4
  • 1
  • 3
Subscribe to the changelog
  • RSS (Latest)
  • RSS (Full)
  • JSON Feed (Latest)
  • JSON Feed (Full)
  1. Changelog
  2. Integrations & Libraries
  3. Content Lake

Numeric Field Name Validation in Patches

Published: August 18, 2025

v2025-08-18

Numeric Field Name Validation

Patch mutations now properly validate field names that start with digits, preventing silent failures and providing clear guidance on how to fix the issue.

If your patch operations use field names that start with a digit - like some UUIDs (7819f29-cd8e-438a-bf53-27953351677a), pure numbers (123), or other identifiers beginning with digits (9abc) - you'll now receive helpful error messages showing exactly how to use bracket notation to make them work: ['7819f29-cd8e-438a-bf53-27953351677a']. JSONPath requires this bracket notation for fields starting with digits to distinguish them from array indices.

This change eliminates frustrating debugging sessions where patches would silently fail or return confusing "field not present" errors, making your mutation operations more reliable and predictable with immediate, actionable feedback.

Breaking changes

To continue using the previous behavior, use an API version prior to 2025-08-18. Updating to 2025-08-18 or later will cause patch mutations with numeric field names to return validation errors instead of silently failing.

Examples

Before (API versions prior to 2025-08-18):

// This silently fails - field is not actually set 
patch.setIfMissing({  '7819f29-cd8e-438a-bf53-27953351677a': 0 })  

// This throws "Cannot increment because it is not present"
patch.inc({  '7819f29-cd8e-438a-bf53-27953351677a': 1 })

After (API version 2025-08-18 and later):

// This now returns a helpful error: 
// "Field path "7819f29-cd8e-438a-bf53-27953351677a" starts with a digit, which is not allowed. Use bracket notation instead: ['7819f29-cd8e-438a-bf53-27953351677a']" 
patch.setIfMissing({  '7819f29-cd8e-438a-bf53-27953351677a': 0 })  

// Correct usage with bracket notation: 
patch.setIfMissing({  "['7819f29-cd8e-438a-bf53-27953351677a']": 0 })

Related documentation

  • Patches

Loading...

On this page

  • Numeric Field Name Validation
  • Breaking changes
  • Examples
  • Before (API versions prior to 2025-08-18):
  • After (API version 2025-08-18 and later):

Related documentation

  • Patches

// This silently fails - field is not actually set 
patch.setIfMissing({  '7819f29-cd8e-438a-bf53-27953351677a': 0 })  

// This throws "Cannot increment because it is not present"
patch.inc({  '7819f29-cd8e-438a-bf53-27953351677a': 1 })
// This now returns a helpful error: 
// "Field path "7819f29-cd8e-438a-bf53-27953351677a" starts with a digit, which is not allowed. Use bracket notation instead: ['7819f29-cd8e-438a-bf53-27953351677a']" 
patch.setIfMissing({  '7819f29-cd8e-438a-bf53-27953351677a': 0 })  

// Correct usage with bracket notation: 
patch.setIfMissing({  "['7819f29-cd8e-438a-bf53-27953351677a']": 0 })

Previous Changelog

Added support for AVIF image uploads

August 15, 2025

Content Lake

Next Changelog

Projects list now supports filtering to an Organization ID

August 26, 2025

JavaScript Client