isEmptyAndOptional()) return true; $value = $this->form->getData($this->field); $primaryLocale = Locale::getPrimaryLocale(); return is_array($value) && !empty($value[$primaryLocale]) && String::regexp_match($this->regExp, $value[$primaryLocale]); } function getMessage() { $primaryLocale = Locale::getPrimaryLocale(); $allLocales = Locale::getAllLocales(); return parent::getMessage() . ' (' . $allLocales[$primaryLocale] . ')'; } } ?>