mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
Skip extra var validation if manually inserted/updated
This commit is contained in:
parent
d0f0d7205d
commit
52c573fdba
1 changed files with 14 additions and 8 deletions
|
|
@ -842,6 +842,8 @@ class DocumentController extends Document
|
|||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$manual_inserted)
|
||||
{
|
||||
$ev_output = $extra_item->validate($value);
|
||||
if ($ev_output && !$output->toBool())
|
||||
|
|
@ -849,6 +851,7 @@ class DocumentController extends Document
|
|||
$oDB->rollback();
|
||||
return $ev_output;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle extra vars that support file upload.
|
||||
if ($extra_item->type === 'file' && is_array($value))
|
||||
|
|
@ -1224,12 +1227,15 @@ class DocumentController extends Document
|
|||
else
|
||||
{
|
||||
// Check for required and strict values.
|
||||
if (!$manual_updated)
|
||||
{
|
||||
$ev_output = $extra_item->validate($value);
|
||||
if ($ev_output && !$ev_output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $ev_output;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle extra vars that support file upload.
|
||||
if ($extra_item->type === 'file')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue