notEmpty() not working
See original GitHub issueHi , i’m using latest version of express-validator,
and there is nothing about notEmpty in readme.md .
when i use it shows this message
check('topic', 'this is not be empty').notEmpty(),
TypeError: check(...).notEmpty is not a function
so how can i use ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Hibernate validator @NotEmpty not working spring boot and ...
The @NotEmpty validation is not kicked off at all. Hibernate validation only works if the json has errors element in it as below...
Read more >Difference Between @NotNull, @NotEmpty, and @NotBlank ...
In a nutshell, this means that a field (e.g. CharSequence, Collection, Map, or Array) constrained with @NotEmpty must be not null, and its...
Read more >Built-in Validators — FluentValidation documentation
NotEmpty Validator¶. Ensures that the specified property is not null, an empty string or whitespace (or the default value for value types, e.g.,...
Read more >Using Fluent Validation in ASP.NET Core - Powerful Validations
It's highly practical to show custom validation based on the property. It's quite simple with Fluent Validation. Go to the DeveloperValidator.cs ...
Read more >Built-In, Nested, Custom Validators with FluentValidation
In most cases, you'd just use the NotEmpty() validator, unless you want to allow whitespace as a valid value, however, it's worth showing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
use,
check('lastName').not().isEmpty().withMessage('The Last name is required')
Hey @jaguardev, You would do it like this: