PR comment followups (isNonEmptyString and rename WorkflowExecutionResult) (#13706)
Addressing two comments from Thomas and Charles
This commit is contained in:
+2
-1
@@ -1,7 +1,8 @@
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
import { ValidateIf, ValidationOptions, isDefined } from 'class-validator';
|
||||
|
||||
export function IsOptionalOrEmptyString(validationOptions?: ValidationOptions) {
|
||||
return ValidateIf((_obj, value) => {
|
||||
return isDefined(value) && value !== '';
|
||||
return isDefined(value) && isNonEmptyString(value);
|
||||
}, validationOptions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user