Skip to content

Commit

Permalink
added lower/upper filter types
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 27, 2017
1 parent 7274f52 commit c1edbab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions system/src/Grav/Common/Data/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ protected static function typeCommaList($value, array $params, array $field)
return is_array($value) ? true : self::typeText($value, $params, $field);
}

protected static function filterLower($value, array $params)
{
return strtolower($value);
}

protected static function filterUpper($value, array $params)
{
return strtoupper($value);
}


/**
* HTML5 input: textarea
*
Expand Down Expand Up @@ -664,6 +675,7 @@ public static function filterIgnore($value, array $params, array $field)
return $value;
}


// HTML5 attributes (min, max and range are handled inside the types)

public static function validateRequired($value, $params)
Expand Down

0 comments on commit c1edbab

Please sign in to comment.