Commit 4ce0026e authored by Franco Fichtner's avatar Franco Fichtner

mvc: use internal class/field representation on API error

Before:

[OPNsense.IDS.IDS.general.ips] value should be a boolean (0,1)

After:

[OPNsense\IDS\IDS:general.ips] value should be a boolean (0,1)

(cherry picked from commit 0d6a8336)
parent 2d76c486
......@@ -493,7 +493,7 @@ abstract class BaseModel
if ($messages->count() > 0) {
$exception_msg = "";
foreach ($messages as $msg) {
$exception_msg_part = "[".str_replace("\\", ".", get_class($this)).".".$msg-> getField(). "] ";
$exception_msg_part = "[".get_class($this).":".$msg->getField()."] ";
$exception_msg_part .= $msg->getMessage();
$exception_msg .= "$exception_msg_part\n";
// always log validation errors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment