From a203bcd725db824e7b39f3f9a39c056a6974104f Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Fri, 6 Aug 2010 05:00:16 +0000 Subject: [PATCH] BUGFIX: added default language for the sprintf statement --- code/UserDefinedForm.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/UserDefinedForm.php b/code/UserDefinedForm.php index 7c2cf10..2b43137 100755 --- a/code/UserDefinedForm.php +++ b/code/UserDefinedForm.php @@ -319,9 +319,8 @@ class UserDefinedForm_Controller extends Page_Controller { $fieldValidationOptions = array(); // Set the Error Messages - $errorMessage = sprintf(_t('Form.FIELDISREQUIRED').'.', strip_tags("'". ($field->Title ? $field->Title : $field->Name) . "'")); + $errorMessage = sprintf(_t('Form.FIELDISREQUIRED', '%s is required').'.', strip_tags("'". ($field->Title ? $field->Title : $field->Name) . "'")); $errorMessage = ($field->CustomErrorMessage) ? $field->CustomErrorMessage : $errorMessage; - $fieldToAdd->setCustomValidationMessage($errorMessage); // Set the right title on this field