mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Added unset type/filter to the validation
This commit is contained in:
parent
5cf4eea09e
commit
751d1da704
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user