Permalink
Browse files

refactor pattern validator

  • Loading branch information...
1 parent 2c0ae40 commit a3d590860eda4f635962aa58501effc6b53f8a3b @c9s committed Sep 8, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ValidationKit/PatternValidator.php
@@ -8,7 +8,11 @@ class PatternValidator extends Validator
public function validate($value)
{
- if( $this->saveResult( preg_match( $this->getOption('pattern') , $value , $matches ,$this->getOption('flags') ) ) ) {
+ if( preg_match( $this->getOption('pattern'),
+ $value,
+ $matches,
+ $this->getOption('flags') ) )
+ {
$this->matches = $matches;
return $this->valid();
}

0 comments on commit a3d5908

Please sign in to comment.