nestjs / docs.nestjs.com

The official documentation https://docs.nestjs.com 📕
MIT License
1.13k stars 1.61k forks source link

docs: improve configuration schema validation example #2986

Closed ryoku4 closed 3 months ago

ryoku4 commented 3 months ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

The example code for PORT validation in the configuration schema allows to accept any numeric value without enforcing constraints on valid port numbers.

Issue Number: N/A

What is the new behavior?

The example code for PORT validation in the configuration schema is improved to only accept valid port numbers within the range of 0 to 65535.

Does this PR introduce a breaking change?

Other information

Note: @IsPort from class-validator only works with string.

kamilmysliwiec commented 3 months ago

lgtm