Validata Mongo
JSON →Type-safe data validation and sanitization for MongoDB update $set operations, built on top of the validata validation library. Current stable version is 1.1.1. It provides a set of checkers (isObjectSet, isString, maybeString, isNumber, asNumber) that validate and coerce data before applying it to MongoDB $set updates, supporting both nested object structures and dot-notation paths. Unlike generic validators, it is specifically designed to match MongoDB's update semantics, including optional fields, coercion, and rejection of unexpected properties. It ships with TypeScript definitions and has a moderate release cadence.
Resources
packagevalidata-mongo ↗