Skip to content
Snippets Groups Projects
Commit 8a5bc59f authored by Joseph AKEL's avatar Joseph AKEL
Browse files

fix/23941/2301 TIME 1:30 Adding a validator for field at 0

parent 1bbb3c7d
No related branches found
No related tags found
No related merge requests found
......@@ -389,7 +389,7 @@ class ResourceControlController
}
if (strpos($indexingModelField['identifier'], 'indexingCustomField_') !== false) {
$customFieldId = explode('_', $indexingModelField['identifier'])[1];
if ($indexingModelField['mandatory'] && empty($body['customFields'][$customFieldId])) {
if ($indexingModelField['mandatory'] && Validator::intType()->notEmpty()->validate($body['customFields'][$customFieldId])) {
return ['errors' => "Body customFields[{$customFieldId}] is empty"];
}
if (!empty($body['customFields'][$customFieldId])) {
......
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