mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 15:29:57 +01:00
Added unset type/filter to the validation
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user