MinLength<N> is a type tag that validates string values have at least the
specified number of characters. Apply it to string properties using
TypeScript intersection types.
This constraint is commonly combined with MaxLength to define a valid
length range. Multiple length constraints can be applied to the same property
(all must pass).
The constraint is enforced at runtime by typia.is(), typia.assert(), and
typia.validate(). It generates minLength in JSON Schema output.
interfaceUser { // Username must be at least 3 characters username: string & MinLength<3> & MaxLength<20>; // Password must be at least 8 characters password: string & MinLength<8>; }
String minimum length constraint.
MinLength<N>is a type tag that validates string values have at least the specified number of characters. Apply it tostringproperties using TypeScript intersection types.This constraint is commonly combined with MaxLength to define a valid length range. Multiple length constraints can be applied to the same property (all must pass).
The constraint is enforced at runtime by
typia.is(),typia.assert(), andtypia.validate(). It generatesminLengthin JSON Schema output.