Fix: Fixes after peer review for #833

This commit is contained in:
Jose Pereira 2019-01-16 12:24:28 +13:00
parent 2ac6ae6a47
commit 7406670003
2 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class EditableTextField extends EditableFormField
$result = parent::validate(); $result = parent::validate();
if ($this->MinLength > $this->MaxLength) { if ($this->MinLength > $this->MaxLength) {
$result->addError("Minimum length should be less than the Maximum length."); $result->addError(_t(__CLASS__.'MINMAXLENGTHCHECK', 'Minimum length should be less than the Maximum length.' ));
} }
return $result; return $result;

View File

@ -208,6 +208,7 @@ en:
RANGE_TO: to RANGE_TO: to
SINGULARNAME: 'Text Field' SINGULARNAME: 'Text Field'
TEXTLENGTH: 'Allowed text length' TEXTLENGTH: 'Allowed text length'
MINMAXLENGTHCHECK: 'Minimum length should be less than the Maximum length.'
SilverStripe\UserForms\Model\EditableFormField\Validator: SilverStripe\UserForms\Model\EditableFormField\Validator:
REQUIRED_ERROR: 'Form fields cannot be required and have conditional display rules.' REQUIRED_ERROR: 'Form fields cannot be required and have conditional display rules.'
SilverStripe\UserForms\Model\Recipient\EmailRecipient: SilverStripe\UserForms\Model\Recipient\EmailRecipient: