We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3d6956 commit a1cbdd0Copy full SHA for a1cbdd0
1 file changed
src/backend/src/utils/validation.utils.ts
@@ -211,15 +211,10 @@ export const materialValidators = [
211
];
212
export const copyMaterialsValidators = [
213
body('materialIds').isArray({ min: 1 }),
214
- body('materialIds.*').isString().notEmpty(),
215
- body('destinationWbsNum')
216
- .custom((value) => {
217
- validateWBS(value);
218
- return true;
219
- })
220
- .customSanitizer((value) => {
221
- return validateWBS(value);
222
+ nonEmptyString(body('materialIds.*')),
+ body('destinationWbsNum').customSanitizer((value) => {
+ return validateWBS(value);
+ })
223
224
export const validateInputs = (req: Request, res: Response, next: Function): void => {
225
const errors = validationResult(req);
0 commit comments