l.any()
Always passes the type check. Use it for a field you want listed in a schema without constraints, or as the start of a chain that is only a custom validator: l.any().custom(...). Returns an AnyValidator<Object?>; .required() narrows it to Object.
Signature
Section titled “Signature”AnyValidator<Object?> any()Code none. Default message: l.any() has no type check, so it reports no issue of its own. l.any().required() reports value is required for null.
Code generation
Section titled “Code generation”A dynamic, Object or Object? parameter maps to l.any(). dynamic never gets .required(), because dynamic admits null. A field with a JsonConverter or @JsonKey(fromJson:) is also validated as l.any(), because the generator cannot know the raw shape.
Example
Section titled “Example”final payload = l.any();required dynamic payload, // l.any()required Object meta, // l.any().required()payload.validate(input)+3-0- valid:
42 - valid:
null - valid:
{'k': 'v'}
[value is required]