| @@ 165-169 (lines=5) @@ | ||
| 162 | */ |
|
| 163 | private static function _valid_element_name($name) |
|
| 164 | { |
|
| 165 | if (Lang::isUnicodeCompiled()) { |
|
| 166 | $valid_name = preg_match('/^[\p{L}]([0-9\p{L}\.\-\_]+)?$/u', $name); |
|
| 167 | } else { |
|
| 168 | $valid_name = preg_match('/^[A-z]([\w\d-_\.]+)?$/i', $name); |
|
| 169 | } |
|
| 170 | ||
| 171 | if ($valid_name) { |
|
| 172 | $xKey = self::$dom->createElement( |
|
| @@ 926-930 (lines=5) @@ | ||
| 923 | $label = $this->get('label'); |
|
| 924 | $element_name = $this->get('element_name'); |
|
| 925 | ||
| 926 | if (Lang::isUnicodeCompiled()) { |
|
| 927 | $valid_name = preg_match('/^[\p{L}]([0-9\p{L}\.\-\_]+)?$/u', $element_name); |
|
| 928 | } else { |
|
| 929 | $valid_name = preg_match('/^[A-z]([\w\d-_\.]+)?$/i', $element_name); |
|
| 930 | } |
|
| 931 | ||
| 932 | if ($label === '') { |
|
| 933 | $errors['label'] = __('This is a required field.'); |
|