_requiredLocale = $requiredLocale; } // // Getters and Setters // /** * Get the error message associated with a failed validation check. * * @see FormValidator::getMessage() * * @return string */ public function getMessage() { return parent::getMessage() . ' (' . Locale::getMetadata($this->_requiredLocale)->getDisplayName() . ')'; } // // Protected helper methods // /** * @see FormValidator::getFieldValue() */ public function getFieldValue() { $form = & $this->getForm(); $data = $form->getData($this->getField()); $fieldValue = ''; if (is_array($data) && isset($data[$this->_requiredLocale])) { $fieldValue = $data[$this->_requiredLocale]; if (is_scalar($fieldValue)) { $fieldValue = trim((string)$fieldValue); } } return $fieldValue; } } if (!PKP_STRICT_MODE) { class_alias('\PKP\form\validation\FormValidatorLocale', '\FormValidatorLocale'); }