@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
20 lines • 930 B
text/typescript
import { Constructor } from "./mixins.mjs";
import { SingleOrArray } from "../types.mjs";
import { ValidationOptions } from "class-validator";
//#region src/utils/validators.d.ts
export interface IsInstanceOrArrayOfInstancesValidationOptions extends ValidationOptions {
classType: SingleOrArray<new (...args: any[]) => any>;
/**
* Whether to allow empty arrays to pass validation
* @default false
*/
allowEmptyArray?: boolean;
}
/**
* Checks if the value is a string or the specified instance
*/
export declare function IsStringOrInstance(targetType: Constructor, validationOptions?: ValidationOptions): PropertyDecorator;
export declare function IsStringOrInstanceOrArrayOfInstances(validationOptions: IsInstanceOrArrayOfInstancesValidationOptions): PropertyDecorator;
export declare function IsUri(validationOptions?: ValidationOptions): PropertyDecorator;
//#endregion
//# sourceMappingURL=validators.d.mts.map