js Validating promises

The solution for “js Validating promises” can be found here. The following code will assist you in solving the problem.

// If your object contains property with Promise-returned
// value that should be validated, then you need to use
// the @ValidatePromise() decorator:

import { ValidatePromise, Min } from ‘class-validator’;

export class Post {
userId: Promise;

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in