( minLength: number, annotations?: Annotations.Filter<Schema.Type<S>> )
| 4321 | * @since 3.10.0 |
| 4322 | */ |
| 4323 | export const minLength = <S extends Schema.Any>( |
| 4324 | minLength: number, |
| 4325 | annotations?: Annotations.Filter<Schema.Type<S>> |
| 4326 | ) => |
| 4327 | <A extends string>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> => |
| 4328 | self.pipe( |
| 4329 | filter( |
| 4330 | (a) => a.length >= minLength, |
| 4331 | { |
| 4332 | schemaId: MinLengthSchemaId, |
| 4333 | title: `minLength(${minLength})`, |
| 4334 | description: `a string at least ${minLength} character(s) long`, |
| 4335 | jsonSchema: { minLength }, |
| 4336 | ...annotations |
| 4337 | } |
| 4338 | ) |
| 4339 | ) |
| 4340 | |
| 4341 | /** |
| 4342 | * @category schema id |
no test coverage detected
searching dependent graphs…