Skip to content
Snippets Groups Projects
Commit aa6ec3d0 authored by Mathieu's avatar Mathieu
Browse files

FEAT #18862 TIME 0:01 fix always empty title

parent 997bfcd8
No related branches found
No related tags found
No related merge requests found
...@@ -1038,7 +1038,7 @@ class AttachmentController ...@@ -1038,7 +1038,7 @@ class AttachmentController
return ['errors' => 'Body resIdMaster is empty or not an integer']; return ['errors' => 'Body resIdMaster is empty or not an integer'];
} elseif (!Validator::stringType()->notEmpty()->validate($body['type'])) { } elseif (!Validator::stringType()->notEmpty()->validate($body['type'])) {
return ['errors' => 'Body type is empty or not a string']; return ['errors' => 'Body type is empty or not a string'];
} elseif (!empty($body['title']) || !Validator::length(1, 255)->validate($body['title'])) { } elseif (!empty($body['title']) && !Validator::length(1, 255)->validate($body['title'])) {
return ['errors' => 'Body title number of characters must be between 1 and 255 characters)']; return ['errors' => 'Body title number of characters must be between 1 and 255 characters)'];
} elseif (isset($body['status']) && !in_array($body['status'], ['A_TRA', 'TRA', 'SEND_MASS'])) { } elseif (isset($body['status']) && !in_array($body['status'], ['A_TRA', 'TRA', 'SEND_MASS'])) {
return ['errors' => 'Body status can only be A_TRA, TRA or SEND_MASS']; return ['errors' => 'Body status can only be A_TRA, TRA or SEND_MASS'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment