Closed varHarrie closed 7 years ago
add notEq to ensure val !== otherVal
notEq
val !== otherVal
BTW, is there any way to simplify that:
// ensures `name` is a significative string, not empty and not space characters // '' ==> false // ' ' ==> false ctx.validateBody('name').isString().trim().notEq('')
@varHarrie Good idea.
I'm not sure how it could be shortened.
@danneu I mean we can add notEmpty to do that, and I think add custom validator for myself is a good choice.
notEmpty
add
notEq
to ensureval !== otherVal
BTW, is there any way to simplify that: