DB
Size: a a a
DB
KA
DB
KA
KS
MY
LK
MY
LK
VA
VA
VK
VK
VK
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module';
import { ValidationError, ValidationPipe } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.disable('x-powered-by');
app.useGlobalPipes(
new ValidationPipe({
exceptionFactory: errors => {
console.log({ errors });
return errors;
},
}),
);
await app.listen(3000);
}
bootstrap();
VK
VK
[
{
"target": {
"email": "test@gmail.com",
"password": "12312312312312",
"address": {}
},
"value": {},
"property": "address",
"children": [
{
"target": {},
"property": "country",
"children": [],
"constraints": {
"isString": "country must be a string"
}
},
{
"target": {},
"property": "city",
"children": [],
"constraints": {
"isString": "city must be a string"
}
}
]
}
]
VA
VA
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module';
import { ValidationError, ValidationPipe } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.disable('x-powered-by');
app.useGlobalPipes(
new ValidationPipe({
exceptionFactory: errors => {
console.log({ errors });
return errors;
},
}),
);
await app.listen(3000);
}
bootstrap();