Minor linting adjustment.

This commit is contained in:
Maxime Rainville 2020-01-14 12:28:04 +13:00
parent 39ee08cff9
commit e2c05d5a55
2 changed files with 14 additions and 18 deletions

View File

@ -134,21 +134,17 @@ class UserFormsRequiredFields extends RequiredFields
$errorMessage = _t(
'SilverStripe\\Forms\\Form.FIELDISREQUIRED',
'{name} is required',
array(
[
'name' => strip_tags(
'"' . ($formField->Title() ? $formField->Title() : $fieldName) . '"'
)
)
]
);
if ($msg = $formField->getCustomValidationMessage()) {
$errorMessage = $msg;
}
$this->validationError(
$fieldName,
$errorMessage,
"required"
);
$this->validationError($fieldName, $errorMessage, "required");
}
}

View File

@ -240,7 +240,7 @@ class EditableCustomRule extends DataObject
* @return boolean
* @throws LogicException Invalid ConditionOption is set for this rule.
*/
public function validateAgainstFormData($data)
public function validateAgainstFormData(array $data)
{
$controllingField = $this->ConditionField();