From d9fbf330e5302355b4c59d14fec7311e2375fb24 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 9 Oct 2024 20:33:15 +0100 Subject: [PATCH] Fixed translations Signed-off-by: snipe --- app/Http/Requests/StoreLdapSettings.php | 10 +--------- resources/lang/en-US/validation.php | 8 +++++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/Http/Requests/StoreLdapSettings.php b/app/Http/Requests/StoreLdapSettings.php index 48979b01a5..c707fc3bd4 100644 --- a/app/Http/Requests/StoreLdapSettings.php +++ b/app/Http/Requests/StoreLdapSettings.php @@ -22,6 +22,7 @@ class StoreLdapSettings extends FormRequest */ public function rules(): array { + \Log::error('boop'); return [ 'ldap_username_field' => 'not_in:sAMAccountName|required_if:ldap_enabled,1', 'ldap_auth_filter_query' => 'not_in:uid=samaccountname|required_if:ldap_enabled,1', @@ -29,13 +30,4 @@ class StoreLdapSettings extends FormRequest ]; } - public function messages(): array - { - return [ - 'ldap_username_field' => trans('validation.custom.ldap_username_field.not_in'), - 'ldap_auth_filter_query' => trans('validation.custom.ldap_auth_filter_query.not_in'), - 'ldap_filter' => trans('validation.custom.ldap_filter.regex'), - ]; - } - } diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php index 52f1b43bf9..7d7840eb42 100644 --- a/resources/lang/en-US/validation.php +++ b/resources/lang/en-US/validation.php @@ -208,9 +208,11 @@ return [ 'radio_buttons' => ':attribute is invalid.', 'invalid_value_in_field' => 'Invalid value included in this field', - 'ldap_username_field.not_in' => 'sAMAccountName (mixed case) will likely not work. You should use samaccountname (lowercase) instead. ', - 'ldap_auth_filter_query.not_in' => 'uid=samaccountname is probably not a valid auth filter. You probably want uid= ', - 'ldap_filter.regex' => 'This value should probably not be wrapped in parentheses.', + 'ldap_username_field' => [ + 'not_in' => 'sAMAccountName (mixed case) will likely not work. You should use samaccountname (lowercase) instead.' + ], + 'ldap_auth_filter_query' => ['not_in' => 'uid=samaccountname is probably not a valid auth filter. You probably want uid= '], + 'ldap_filter' => ['regex' => 'This value should probably not be wrapped in parentheses.'], ], /*