Skip extra var validation if manually inserted/updated

This commit is contained in:
Kijin Sung 2024-10-09 01:47:21 +09:00
parent d0f0d7205d
commit 52c573fdba

View file

@ -843,11 +843,14 @@ class DocumentController extends Document
}
else
{
$ev_output = $extra_item->validate($value);
if ($ev_output && !$output->toBool())
if (!$manual_inserted)
{
$oDB->rollback();
return $ev_output;
$ev_output = $extra_item->validate($value);
if ($ev_output && !$output->toBool())
{
$oDB->rollback();
return $ev_output;
}
}
// Handle extra vars that support file upload.
@ -1224,11 +1227,14 @@ class DocumentController extends Document
else
{
// Check for required and strict values.
$ev_output = $extra_item->validate($value);
if ($ev_output && !$ev_output->toBool())
if (!$manual_updated)
{
$oDB->rollback();
return $ev_output;
$ev_output = $extra_item->validate($value);
if ($ev_output && !$ev_output->toBool())
{
$oDB->rollback();
return $ev_output;
}
}
// Handle extra vars that support file upload.