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