question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IsNotEmpty at Creation + IsEmpty at Update

See original GitHub issue

Hello everyone,

I cannot make this one working:

  @IsNotEmpty({ groups: [CREATE] })
  @IsEmpty({ groups: [UPDATE] })
  name: string

When I try to create with a name in my payload, the validator blocks the call: name must be empty.

Best,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bamandinecommented, Aug 6, 2019

So, after some tests, we have found what was the problem: we had a ValidationPipe defined globally in our project. Once this global ValidationPipe removed, then the 2 validations are working.

0reactions
alisherafat01commented, Dec 6, 2022

same issue for me, global validaton pipe should not be disabled for this issue and there is some problem with this lib

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blank, Coalesce, IsBlank, and IsEmpty functions in Power Apps
Some controls and data sources use an empty string to indicate a "no value" condition. To simplify app creation, the IsBlank and Coalesce ......
Read more >
Check whether a String is not Null and not Empty
isEmpty () if str is null. Beware, it's only available since Java SE 1.6. You have to check str.length() == 0 on previous...
Read more >
IS NOT EMPTY in a Filter - Designer - Alteryx Community
Solved: Hi Community, How do I write into a Filter IS NOT EMPTY or IS NOT NULL I can see the IsEmpty, or...
Read more >
Check if datetime field is empty - Salesforce Developers
I've been trying to look for a solution with no luck. Simply, I'm trying to write an apex trigger to check whether a...
Read more >
Spring Data repository with empty IN clause.
Actual query was of course more complicated that this. Complex enough to justify not using a query method. The problem emerges when you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found