Skip to content

v3.1.1

Compare
Choose a tag to compare
@samchon samchon released this 15 Jul 18:24
· 2039 commits to master since this release
9bd4848

What's Changed

Full Changelog: v3.0.12...v3.1.1

A new function validate() has come.

The validate() function archives all type errors into an IValidation.errors array, which being returned by the validate() function.

Special thanks for @edobrb who've suggested this validate() function.

export function validate<T>(input: T): IValidation;

export interface IValidation {
    success: boolean;
    errors: IValidation.IError[];
}
export namespace IValidation {
    export interface IError {
        path: string;
        expected: string;
        value: any;
    }
}