mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-13 00:42:08 +08:00
Fix #466 - [Legacy] add array check on Id Field Validator
This commit is contained in:
parent
d792f03aff
commit
3f0448efe8
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ class IdFieldValidator implements FieldValidatorInterface
|
|||
return '';
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$value = $value[0]['id'] ?? $value['id'];
|
||||
}
|
||||
|
||||
if (!is_string($value) && !is_numeric($value)) {
|
||||
return "Invalid id field '$field'. Value not a string nor a number";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue