Brage Sekse Aarset

Results 177 comments of Brage Sekse Aarset

If you aren't decorating the field with any actual validators such as `IsString`, that changes things. A field with no validation decorator on it will be ignored by `class-validator` entirely....

Here's my take on this, @MarkMurphy and @drewwiens ```ts import { IsString, Validate, validate } from 'class-validator'; export class Student { @IsString() name: string; } /** Validates an array of...

could you link this to your issue? `fixes #1715`

> @braaar you don't have permission to merge? Nope, I'm just a humble member of the community :) I'm trying to get this repo active again, though. See #1719

I'm hesitant to take it that far. With the amount of stars and weekly downloads this project has, it would be a huge setback and inconvenience for the end users....

You are definitely onto something, @josephdpurcell. This is a *class* validator, after all. In my projects using `class-validator` I have created a handy helper class that uses `class-transformer` to convert...

Could you explain a little more clearly what you want to do, and perhaps write a little example? Is it possible to implement what you need using `ValidateIf`? ```ts import...

This should be possible, yes. Study the code in these folders to learn more: - https://github.com/typestack/class-validator/tree/develop/src/validation - https://github.com/typestack/class-validator/tree/develop/src/metadata

Here's my workaround for optional strings: ```ts export class Customer { ... @ValidateIf((customer) => customer.displayName !== '') @IsString() @IsOptional() displayName?: string; ... } ``` This validation accepts empty strings `''`.

I think the merge commit made the Semantic Pull Request check fail?