[TASK] Add automated translation for required fields
This commit is contained in:
@@ -544,6 +544,14 @@ class ActionController extends BaseController
|
||||
$errorLabel = $this->getTranslation(
|
||||
'error.' . $field . '.required'
|
||||
);
|
||||
if ($errorLabel == null) {
|
||||
$fieldLabel = $this->getTranslation(
|
||||
'field.' . $field
|
||||
);
|
||||
$errorLabel = $this->getTranslation(
|
||||
'error.required', [$fieldLabel]
|
||||
);
|
||||
}
|
||||
if ($errorLabel == null) {
|
||||
$errorLabel = 'error.'
|
||||
. $field
|
||||
|
||||
Reference in New Issue
Block a user