mirror of
https://github.com/getgrav/grav.git
synced 2026-03-01 18:11:25 +01:00
Added unset type/filter to the validation
This commit is contained in:
@@ -662,6 +662,23 @@ class Validation
|
|||||||
return $value;
|
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)
|
// HTML5 attributes (min, max and range are handled inside the types)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user