Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Validation / Plugin / Validation / Constraint / NotNullConstraint.php
diff --git a/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php b/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
new file mode 100644 (file)
index 0000000..75dfb18
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraints\NotNull;
+
+/**
+ * NotNull constraint.
+ *
+ * Overrides the symfony constraint to handle empty Typed Data structures.
+ *
+ * @Constraint(
+ *   id = "NotNull",
+ *   label = @Translation("NotNull", context = "Validation"),
+ *   type = false
+ * )
+ */
+class NotNullConstraint extends NotNull { }