10 defined(
'JPATH_PLATFORM') or die;
13 if (!defined('JCOMPAT_UNICODE_PROPERTIES'))
15 define(
'JCOMPAT_UNICODE_PROPERTIES', (
bool) @preg_match(
'/\pL/u',
'a'));
59 public function test(SimpleXMLElement $element, $value, $group = null,
JRegistry $input = null,
JForm $form = null)
62 if (empty($this->regex))
64 throw new UnexpectedValueException(sprintf(
'%s has invalid regex.', get_class($this)));
68 if (JCOMPAT_UNICODE_PROPERTIES)
70 $this->modifiers = (strpos($this->modifiers,
'u') !==
false) ? $this->modifiers : $this->modifiers .
'u';
74 if (preg_match(chr(1) . $this->regex . chr(1) . $this->modifiers, $value))