nestjs / class-validator Goto Github PK
View Code? Open in Web Editor NEWThis project forked from typestack/class-validator
Fork of the class-validator package. Decorator-based property validation for classes.
License: MIT License
This project forked from typestack/class-validator
Fork of the class-validator package. Decorator-based property validation for classes.
License: MIT License
../node_modules/.pnpm/@[email protected]/node_modules/@nestjs/class-validator/types/decorator/string/IsPhoneNumber.d.ts:2:29 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("libphonenumber-js")' call instead.
2 import { CountryCode } from 'libphonenumber-js';
~~~~~~~~~~~~~~~~~~~
../node_modules/.pnpm/[email protected]/node_modules/libphonenumber-js/index.d.ts:18:8 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.
18 } from './types';
~~~~~~~~~
no
No response
no error message
0.13.4
9.3.9
20.1.8
upstream also suffers from that: typestack#1947 (comment)
Creating a shim file with a reduced size for the browser would be a nice to have.
Create a shim file for each decorator, using the same approach as @nestjs/swagger package.
No response
I would like to reuse dtos files between frontend and backend projects. Opening issue before creating a PR to check if it would be a good idea.
Running npm run audit
throws a critical severity vulnerability on this package.
There should be no critical vulnerabilities
0.13.1
8.0.0
18.12.1
No response
Hi, I am try use validation in NestJS follow document, I need send this query "/api/tournaments/TournamentsList?filterBy=id&filter=1&searchBy=title&search=akiira" is normally query and this my function in controller
`@Get('TournamentsList')
@ApiCreatedResponse({ type: MessageResultAPIModel })
@UsePipes(new ValidationPipe())
async TournamentsList(
@query() dataQuery: QueryObject
) {
try {
console.log(dataQuery.filterBy)
return this.tournamentService.TournamentListService(dataQuery)
} catch (err) {
}
}`
and this my class QueryObject
`export class QueryObject {
@IsString({ each: true })
@isarray()
@IsOptional()
filterBy?: string[]
@IsString({ each: true })
@isarray()
@IsOptional()
filter?: string[]
@IsString({ each: true })
@isarray()
@IsOptional()
searchBy?: string[]
@IsString()
@IsOptional()
search?: string
@IsString()
@IsOptional()
sortBy?: string
@IsEnum(ESorter)
@IsOptional()
sort: Sorter
@IsNumber()
@IsOptional()
page: number
@IsNumber()
@IsOptional()
perPage: number
@IsString({ each: true })
@isarray()
@IsOptional()
selectField?: string[]
@isboolean()
@IsOptional()
TransformDateTime: boolean
}`
When I send request to server have error
{ "statusCode": 400, "message": [ "filterBy must be an array", "filter must be an array", "searchBy must be an array" ], "error": "Bad Request" }
And If I remove @IsArray()
result log is "id"
should ["id"]
.
How I can validation is code. Thanks support.
No response
And If I remove @IsArray()
result log is "id"
should ["id"]
.
^0.14.0
No response
^9.0.0
No response
PR #72
0.13.3 -> 0.13.4
Hi,
We upgraded to @nestjs/[email protected]
and receive the following error during nest build
:
Could not find a declaration file for module 'validator'.
Try `npm i --save-dev @types/validator` if it exists or add a new declaration (.d.ts) file containing `declare module 'validator';`
I saw that #72 removes the dependency.
Has this been an accidental merge issue or are we expected to install @types/validator
ourselves?
Cheers,
Steffen
No response
@nestjs/class-validator
should work out-of-the-box.
No response
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: includeForks
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@types/jest
, jest
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)validator
, @types/validator
).github/workflows/codeql-analysis.yml
actions/checkout v2
github/codeql-action v1
github/codeql-action v1
github/codeql-action v1
.github/workflows/continuous-deployment-workflow.yml
actions/checkout v3
actions/setup-node v3
.github/workflows/continuous-integration-workflow.yml
actions/checkout v3
actions/setup-node v3
actions/checkout v3
actions/setup-node v3
actions/checkout v3
actions/setup-node v3
.github/workflows/lock-closed-issues-workflow.yml
dessant/lock-threads v3
package.json
@types/validator ^13.7.10
libphonenumber-js ^1.10.14
validator ^13.7.0
@rollup/plugin-commonjs ^23.0.4
@rollup/plugin-node-resolve ^15.0.1
@types/jest ^29.2.4
@types/node ^18.11.12
@typescript-eslint/eslint-plugin ^5.46.0
@typescript-eslint/parser ^5.46.0
eslint ^8.29.0
eslint-config-prettier ^8.5.0
eslint-plugin-jest ^27.1.6
husky ^4.3.8
jest ^29.3.1
lint-staged ^13.1.0
prettier ^2.8.1
reflect-metadata 0.1.13
rimraf 3.0.2
rollup ^2.79.1
rollup-plugin-terser ^7.0.2
ts-jest ^29.0.3
ts-node ^10.9.1
typescript ^4.9.4
Snyk security scan reports that nestjs/class-validator has medium vulnerability related to dependency out-of-date.
The medium vulnerability related to dependency out-of-date can be fixed easily by upgrading the validation dependency to 13.7.0 version.
https://snyk.io/vuln/npm%3Avalidator
No response
Library should not have security vulnerabilities.
0.13.3
No response
No response
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.