NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1785 most downloaded on npm
Object schema validation
Last release 23 days ago
11 Sep 2026
Ships unpredictably
gaps range from 8 days to 1.1 years
Nearly every release is documented
notes for 55 of 55 stable releases
204 versions withdrawn
withdrawn after publishing
14 years old
259 releases · first in 2012
- #3152 chore: cleanup for #3151 - #3151 Reject proto as a flat messages() code, closing a sibling of GHSA-gg4h-3hg2-grpc - #3150 messages(): proto as
#3152 chore: cleanup for #3151
#3151 Reject proto as a flat messages() code, closing a sibling of GHSA-gg4h-3hg2-grpc
#3150 messages(): proto as a flat message code still hijacks the returned object's prototype (sibling of GHSA-gg4h-3hg2-grpc)
- #3149 chore: optimize schema creation
One column per quarter.
- #3148 chore: optimize processing of large arrays - #3147 fix: inner external shouldn't execute when parent failover applied - #3141 failover + exter
#3148 chore: optimize processing of large arrays
#3147 fix: inner external shouldn't execute when parent failover applied
#3141 failover + external breakage
- #3144 chore: add regression test for #3143 - #3143 fix(isoDate): pad a bare-hour timeshift with a colon, not just zeros - #2434 Fix time regex
#3144 chore: add regression test for #3143
#3143 fix(isoDate): pad a bare-hour timeshift with a colon, not just zeros
#2434 Fix time regex
- #3138 fix: prevent messages proto injection - #3131 fix: allow allowUnderscore on string().email() - #2972 Incorrect documentation for string().emai
#3138 fix: prevent messages proto injection
#3131 fix: allow allowUnderscore on string().email()
#2972 Incorrect documentation for string().email() 'allowUnderscore' option
- #3134 fix: prevent proto on renames
- #3125 fix: expose multiple string patterns in json schemas - #3124 chore: deny prototype pollution in objects by restoring prototype
#3125 fix: expose multiple string patterns in json schemas
#3124 chore: deny prototype pollution in objects by restoring prototype
- #3120 fix: json schema bugfixes - #3118 chore: switch to for..of loops
#3120 fix: json schema bugfixes
#3118 chore: switch to for..of loops
- #3113 fix: protect link recursion from max call stack
- #3111 feat: add maxRecursion limit to links - #2747 Limit depth of self-referencing schema
#3111 feat: add maxRecursion limit to links
#2747 Limit depth of self-referencing schema
- #3107 fix: improve JSON Schema conversion for number.port() and number.sign()
- #3103 fix: allow NaN in schema describe() output validation - #3099 Fix braces escaping when template doesn't contains any variable - #3098 Support
#3103 fix: allow NaN in schema describe() output validation
#3099 Fix braces escaping when template doesn't contains any variable
#3098 Support libraryOptions in standard validator validate()
#3097 feat: enhance validation to support options in standard function
#3094 any.describe() throws an error if the schema contains .allow(NaN)
- #3102 feat: add Standard JSON Schema - #3096 Consider implementing Standard JSON Schema
#3102 feat: add Standard JSON Schema
#3096 Consider implementing Standard JSON Schema
- #3092 fix: allow coercion of string booleans with trailing whitespace - #3091 Joi.boolean() does not handle strings with trailing spaces
#3092 fix: allow coercion of string booleans with trailing whitespace
#3091 Joi.boolean() does not handle strings with trailing spaces
- #3087 fix: proper types for more complex cases of array - #3086 .array().items() dynamic type item type schema causes issues in typescript
#3087 fix: proper types for more complex cases of array
#3086 .array().items() dynamic type item type schema causes issues in typescript
- #3084 feat: add isAsync() helper - #3082 Added wrapper option to uuid function - #3080 feat: implement standard schema spec - #3078 Implement Standa
#3084 feat: add isAsync() helper
#3082 Added wrapper option to uuid function
#3080 feat: implement standard schema spec
#3078 Implement Standard Schema
#2993 What version of node does this library support?
#2982 feat: Improve array().items type
#2981 feat: Improve alternatives type
#2926 18.0.0 Release Notes
#2925 chore: upgrade modules
- #3153 chore: backport #3151
- #3145 backport #3143 and #3144
- #3139 fix: prevent messages proto injection
- #3135 chore: backport prevent proto on renames
- #3123 chore: backport #3113 to v17
- #3043 fix: correct function type in alternatives error
- #3037 fix: stripUnknown should honor local explicit .unknown(false)
- #3034 fix: label false should also hide explicit labels - #3033 Setting errors.label to false does not remove labels from error messages for keys wi
#3034 fix: label false should also hide explicit labels
#3033 Setting errors.label to false does not remove labels from error messages for keys with labels
- #3032 feat: support encoding uri (follow-up to #3027) - #3027 feat: Support encoding uri - #2889 string().uri() not working with accented characters
#3032 feat: support encoding uri (follow-up to #3027)
#3027 feat: Support encoding uri
#2889 string().uri() not working with accented characters
- #3026 fix: handle bigint in unique rule
- #3018 Fix issue 2730 - Wrong State['path'] type - #2730 Wrong State['path'] type
#3018 Fix issue 2730 - Wrong State['path'] type
#2730 Wrong State['path'] type
- #3016 fix: domain default tld validation - #3015 fix: domain default tld validation - #3007 Domain validation not checking IANA registry by default
#3016 fix: domain default tld validation
#3015 fix: domain default tld validation
#3007 Domain validation not checking IANA registry by default
- #3014 feat: hex prefix - #3011 Allow 0x prefix for hex strings - #2386 Allow 0x prefix for hex strings
#3014 feat: hex prefix
#3011 Allow 0x prefix for hex strings
#2386 Allow 0x prefix for hex strings
- #3013 fix: precision issue on number().multiple() - #3009 fix: LanguageMessages type now supports languages in TypeScript - #3001 fix: do not overri
#3013 fix: precision issue on number().multiple()
#3009 fix: LanguageMessages type now supports languages in TypeScript
#3001 fix: do not override existing labels of underlying schemas in alternatives
#2962 Multiple doesn't work correct
#2875 Fix for #2874
#2874 Missing helper.error() method parameter type definition
#2720 Type declaration for messages option of any.validate() inconsistent with the documentation and actual code
- #2988 feat: allow custom expression functions
- #2986 fix: missing template reference - #2985 Unit test showing example of formula parsing bug - #2974 Unable to access object property with a space
#2986 fix: missing template reference
#2985 Unit test showing example of formula parsing bug
#2974 Unable to access object property with a space in its key via expression templates
- #2983 fix: allow any.error() return type to be ErrorReport[]
- #2975 property metas in Description - #2964 #2963 make return value of validate match type definitions - #2961 Associate Buffer with BinarySchema -
#2975 property metas in Description
#2964 #2963 make return value of validate match type definitions
#2961 Associate Buffer with BinarySchema
#2960 feat: support bindary buffer that has been JSON.parse(JSON.strinified())
#2957 feat: support uuidv6, uuidv7 and uuidv8 guid types
#2954 Coerce toJSON'ed Buffer to real Buffer
- #2945 fix: commit states to avoid memory leak
- #2932 fix: do not trigger warnings and externals on arrays and alternatives mismatches
- #2931 feat: improve external helpers
- #2928 fix: validation warning types - #2927 Type definition incorrect for "warning" return type from validateAsync
#2928 fix: validation warning types
#2927 Type definition incorrect for "warning" return type from validateAsync
- #2919 chore: revert 17.8.x line - #2917 Cannot find module '@hapi/hoek/assert' from 'index.js' - #2914 Support for older Node versions maybe lost in
#2919 chore: revert 17.8.x line
#2917 Cannot find module '@hapi/hoek/assert' from 'index.js'
#2914 Support for older Node versions maybe lost in v17.8
#2913 node_modules/@hapi/hoek/lib/deepEqual.js:274
- #2916 fix: properly transform domain - #2915 Email validation error in v17.8.1
#2916 fix: properly transform domain
#2915 Email validation error in v17.8.1
- #2910 fix: transpile optional chaining
- #2909 chore: use latest address module - #2630 Joi.string().domain() treats '_http._tcp.archive.ubuntu.com' as invalid domain name, even though it w
#2909 chore: use latest address module
#2630 Joi.string().domain() treats '_http._tcp.archive.ubuntu.com' as invalid domain name, even though it works
- #2905 Upgrade @sideway/formula to 3.0.1 for CVE-2023-25166 - #2892 Allow null values in BooleanSchema methods
#2905 Upgrade @sideway/formula to 3.0.1 for CVE-2023-25166
#2892 Allow null values in BooleanSchema methods
- #2867 fix: better unsafe check of exponential numbers - #2762 Add isPresent option to object dependencies - #2672 Some exponential notation strings
#2867 fix: better unsafe check of exponential numbers
#2762 Add isPresent option to object dependencies
#2672 Some exponential notation strings are validated as unsafe numbers
#2542 Number validation fails on some strings with E-notation
- #2859 Fix/throwing errors if required argument is omitted - #2729 Some validation methods don't throw an error when their required argument is omitt
#2859 Fix/throwing errors if required argument is omitted
#2729 Some validation methods don't throw an error when their required argument is omitted
- #2860 fix: allow all schema types to be defined and inferred - #2857 Typing issues with attempt() - #2753 Typescript typing on Joi.string().validate
#2860 fix: allow all schema types to be defined and inferred
#2857 Typing issues with attempt()
#2753 Typescript typing on Joi.string().validate(...)
- #2851 Try improving handling of unions - #2850 fix: do not confuse booleans for alernatives in strict mode - #2848 Strict object schema with a boole
#2851 Try improving handling of unions
#2850 fix: do not confuse booleans for alernatives in strict mode
#2848 Strict object schema with a boolean property expects alternative, not boolean
- #2844 types: support strict alternatives - #2843 chore: update license - #2842 Fix spelling - #2841 Allow sub-objects for TypeScript strict object s
#2844 types: support strict alternatives
#2843 chore: update license
#2842 Fix spelling
#2841 Allow sub-objects for TypeScript strict object schema
#2838 feat: change validateAsync return type to match options
#2836 fix(d.ts): allow nested object schema for strictly typed object
#2829 fix(d.ts)!: type details param of ValidationError constructor
#2819 Add artifact to typings.
#2818 Typescript support for .artifact()
#2813 Fix Joi issue #2746
#2808 feat(d.ts): Add type information for maxDomainSegments to EmailOptions and DomainOptions interfaces
#2797 feat(d.ts): improve attempt return type
#2788 Include local into ErrorReport type
#2785 fix(typings): incompatible type issue for nested strict object schemas
#2764 Incompatible type expected for object schemas nested in strict object schemas
#2749 fixed typo
#2746 Using Joi.attempt with { convert: false } does not prevent conversion.
#2727 Fix validateAsync return type
#2663 Property "local" does not exist on type "ErrorReport"
- #2732 Support length() in templates
- #2708 How can I define both specific error messages and a default error message? - #2706 Error messages do not distinguish between numbers and strin
#2708 How can I define both specific error messages and a default error message?
#2706 Error messages do not distinguish between numbers and strings!Easily misleading
#2703 issue #2606: pass TSchema from ObjectSchema to .validate function
#2698 Add Date -> Joi.DateSchema map to ObjectPropertiesSchema<T>
#2687 string().min(0) is failing to validate a zero-length string
#2666 Updated multiple rule to support decimal/float base
#2665 Fix typings on any.external(): add helpers argument
#2651 Fix label elimination for externals
#2649 fix: Joi.string().hostname() not returning errors for CIDR notation
#2648 Incorrect hostname validation
#2635 any.external: can't disable label
#2605 "ExternalValidationFunction" type is missing "helpers" parameter in index.d.ts
#2600 Joi.external() error message
#2590 defaults in alternatives should work recursively
#2589 merge subschema matches when subchemas are objects, or alternatives of objects
#2577 add subschema property validation failures to context
- #2685 Joi.string().email() passes for foo@bar%2ecom
- #2642 Fix issue with only required items. Fixes #2620. - #2624 Fix Web Workers compatibility - #2620 If all elements of array is required, it does n
#2642 Fix issue with only required items. Fixes #2620.
#2624 Fix Web Workers compatibility
#2620 If all elements of array is required, it does not validate unknown items
#2251 dist/joi-browser.min.js doesn't work in workers
- #2627 Add object type guards schema - #2586 fix isSchema type definition - #2585 type problem in Joi.isSchema function - #2573 Add option array type
#2627 Add object type guards schema
#2586 fix isSchema type definition
#2585 type problem in Joi.isSchema function
#2573 Add option array type to AlternativesSchema.conditional
- #2556 fix: any.when() options parameters not supported as Array in index.d.ts - #2555 Type definition for the function any.when() mismatch the docum
#2556 fix: any.when() options parameters not supported as Array in index.d.ts
#2555 Type definition for the function any.when() mismatch the documentation and usage
#2551 feat: Make Joi.Schema generic
#2548 fix: defaults in ordered array are not filled
#2543 URI validation, allowRelative with domain
#2536 merge the results of a .match('all') if all the subschemas are objects
#2535 defaults in alternatives with a match mode set are not returned
#2534 Remove incorrect errors type
#2532 Fix confusing message when refs are passed
#2528 Added guid separator and made version optional
#2523 errors is always undefined in ValidationResult
#2521 Fix type of schema passed to alter functions
#2518 fix for stripUnknown not working for nested object on invalid object
#2502 Appends the allowed object keys in typescript
#2479 Inconsistency with stripUnknown: true and failing validation rules
#2471 Joi.object().xor() throws with "must be a string or a reference" when passed a reference
#2459 stripUnknown doesn't work for nested objects
#2404 defaults in ordered array are not filled
- #2477 Add RegExp to the supported types for Extension.type - #2475 Add render property to ReferenceOptions TS def - #2465 @hapi/formula@2.0.0 Deprec
#2477 Add RegExp to the supported types for Extension.type
#2475 Add render property to ReferenceOptions TS def
#2465 @hapi/formula@2.0.0 Deprecated
#2455 Expose prefs in external()
#2454 CustomValidator return type adjusted in typescript
#2442 Update index.d.ts
#2441 Wrong field name in ValidationError (index.d.ts)
- #2450 Update dev site
- #2431 Import types from DT - #2421 Support ISO8601 with hours timeshift only - #2419 isoDate doesn't recognize correct string - #2408 Fix number pad
#2431 Import types from DT
#2421 Support ISO8601 with hours timeshift only
#2419 isoDate doesn't recognize correct string
#2408 Fix number padding (e.g. 00000) and trailing decimal points (e.g. 2.)
#2407 "2." throws number.unsafe
#2406 "00000" throws number.unsafe
#2398 Support maxDomainSegments
#2380 Joi.build() does not work with complex extension bases
#2377 Add extension validation for "cast"
#2361 Validation artifacts collected from successful rules
#2348 object.default() broke when object is extended
#2337 tlds fails to error on invalid segment
#2330 Consistently apply wrap setting
#2320 invalid GUID/UUID is validated as valid
#2318 larger than is incorrect for comparing quanties
#2303 Add option to resolve .ref() and .in() values in error messages.
#2284 Array item could not be an Error
- #2316 Validate domain in relative uri - #2293 Fix error on changeless forks. Fixes #2292. - #2292 Fork object with option already applied
#2316 Validate domain in relative uri
#2293 Fix error on changeless forks. Fixes #2292.
#2292 Fork object with option already applied
- #1691 joi.bind yields any() methods not fully bound
- #1665 path-related methods ( with(), nand() ...) broken when applied on func()` - #1631 Destructuring Throws Fatal
#1665 path-related methods ( with(), nand() ...) broken when applied on func()`
#1631 Destructuring Throws Fatal
Your coding agent can read these notes before it upgrades. Set up the MCP server →