New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsNotEmpty at Creation + IsEmpty at Update #194
Comments
Hi, crud/integration/crud-typeorm/users/user.entity.ts Lines 23 to 24 in b1f0924
I'm not sure that it's related to the crud lib itself, I have a feeling that you mess up with something in your project :( If it's still an issue please provide me with the example repo. |
Hi, I have the same issue : I have a required field for the creation of my object, but I don't want this field to be modified after. With the Also, I try this : @IsDefined({ groups: [CREATE] })
@IsEmpty({ groups: [UPDATE] })
name: string But same result : on
|
So, after some tests, we have found what was the problem: we had a |
@bamandine I don't understand how a guard put at the global level can influence the behaviour of the decorator. Disabling the global guard is a workaround ? Or is there some logical explanation for it to work ? |
@lapwat The global |
same issue for me, global validaton pipe should not be disabled for this issue and there is some problem with this lib |
@alisherafat01 I came across the same issue, I found the solution was on https://docs.nestjs.com/pipes#global-scoped-pipes
Having this in your AppModule makes the global validation pipe work. |
Hello everyone,
I cannot make this one working:
When I try to create with a name in my payload, the validator blocks the call:
name must be empty
.Best,
The text was updated successfully, but these errors were encountered: