Added unset type/filter to the validation

This commit is contained in:
Matias Griese
2019-01-11 13:03:04 +02:00
parent 5cf4eea09e
commit 751d1da704

View File

@@ -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)