mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX: added default language for the sprintf statement
This commit is contained in:
parent
0e68b7c70a
commit
a203bcd725
@ -319,9 +319,8 @@ class UserDefinedForm_Controller extends Page_Controller {
|
|||||||
$fieldValidationOptions = array();
|
$fieldValidationOptions = array();
|
||||||
|
|
||||||
// Set the Error Messages
|
// 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;
|
$errorMessage = ($field->CustomErrorMessage) ? $field->CustomErrorMessage : $errorMessage;
|
||||||
|
|
||||||
$fieldToAdd->setCustomValidationMessage($errorMessage);
|
$fieldToAdd->setCustomValidationMessage($errorMessage);
|
||||||
|
|
||||||
// Set the right title on this field
|
// Set the right title on this field
|
||||||
|
Loading…
Reference in New Issue
Block a user