From 751d1da7048f13ac37176d09da4097571c251f8f Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Fri, 11 Jan 2019 13:03:04 +0200 Subject: [PATCH] Added unset type/filter to the validation --- system/src/Grav/Common/Data/Validation.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/system/src/Grav/Common/Data/Validation.php b/system/src/Grav/Common/Data/Validation.php index fbf8922f8..f3a03f04e 100644 --- a/system/src/Grav/Common/Data/Validation.php +++ b/system/src/Grav/Common/Data/Validation.php @@ -662,6 +662,23 @@ class Validation return $value; } + /** + * Input value which can be ignored. + * + * @param mixed $value Value to be validated. + * @param array $params Validation parameters. + * @param array $field Blueprint for the field. + * @return bool True if validation succeeded. + */ + public static function typeUnset($value, array $params, array $field) + { + return true; + } + + public static function filterUnset($value, array $params, array $field) + { + return null; + } // HTML5 attributes (min, max and range are handled inside the types)