Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/src/dovalidate.php b/src/dovalidate.php
new file mode 100644
index 0000000..3f5084c
--- /dev/null
+++ b/src/dovalidate.php
@@ -0,0 +1,27 @@
+<?php
+require_once("core.php");
+security::checkType(security::WORKER);
+
+if (!security::checkParams("POST", [
+  ["incidents", security::PARAM_ISSET],
+  ["records", security::PARAM_ISSET],
+  ["method", security::PARAM_ISINT]
+])) {
+  security::go("validations.php?msg=unexpected");
+}
+
+$method = (int)$_POST["method"];
+
+$status = validations::validate($method, $_POST["incidents"], $_POST["records"]);
+switch ($status) {
+  case 0:
+  security::go("validations.php?msg=success");
+  break;
+
+  case 1:
+  security::go("validations.php?msg=partialsuccess");
+  break;
+
+  default:
+  security::go("validations.php?msg=unexpected");
+}