diff options
author | wei <> | 2007-05-01 03:19:30 +0000 |
---|---|---|
committer | wei <> | 2007-05-01 03:19:30 +0000 |
commit | 419f0815c85a40639ac82c1ce05c80186a64dc55 (patch) | |
tree | e875e519451b617a822bece75e24d23d3b93236e /framework/Web/UI | |
parent | 595a0acc2554da4c4c52f065dc76893c241f2624 (diff) |
remove identity map in active record.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r-- | framework/Web/UI/WebControls/TRegularExpressionValidator.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TRegularExpressionValidator.php b/framework/Web/UI/WebControls/TRegularExpressionValidator.php index c4f7ceac..2f65d6b6 100644 --- a/framework/Web/UI/WebControls/TRegularExpressionValidator.php +++ b/framework/Web/UI/WebControls/TRegularExpressionValidator.php @@ -87,12 +87,32 @@ class TRegularExpressionValidator extends TBaseValidator if(($value=$this->getValidationValue($this->getValidationTarget()))==='')
return true;
if(($expression=$this->getRegularExpression())!=='')
- return preg_match("/^$expression\$/",$value);
+ {
+ $mods = $this->getPatternModifiers();
+ return preg_match("/^$expression\$/{$mods}",$value);
+ }
else
return true;
}
/**
+ * @param string pattern modifiers,
+ * see http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php
+ */
+ public function setPatternModifiers($value)
+ {
+ $this->setViewState('PatternModifiers', $value);
+ }
+
+ /**
+ * @return string pattern modifiers, no modifiers by default.
+ */
+ public function getPatternModifiers()
+ {
+ return $this->getViewState('PatternModifiers', '');
+ }
+
+ /**
* Returns an array of javascript validator options.
* @return array javascript validator options.
*/
|