Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #114 Respect additionalChars

  • Loading branch information...
commit f1f9bc0b54aa57916fa7d16d4f3bd32af82afa5b 1 parent a68780b
@nickl- nickl- authored
View
6 library/Respect/Validation/Rules/AbstractCtypeRule.php
@@ -7,9 +7,9 @@
protected function filterWhiteSpaceOption($input)
{
- if (empty($this->additionalChars))
- return preg_replace('/\s/', '', $input);
- return parent::filter($input);
+ if (!empty($this->additionalChars))
+ $input = str_replace(str_split($this->additionalChars), '', $input);
+ return preg_replace('/\s/', '', $input);
}
public function validateClean($input)
View
2  library/Respect/Validation/Rules/AbstractFilterRule.php
@@ -5,7 +5,7 @@
abstract class AbstractFilterRule extends AbstractRule
{
- protected $additionalChars = "";
+ public $additionalChars = "";
abstract protected function validateClean($input);
Please sign in to comment.
Something went wrong with that request. Please try again.