diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php index 05374e23af..f200edf759 100644 --- a/resources/lang/en-US/validation.php +++ b/resources/lang/en-US/validation.php @@ -155,8 +155,14 @@ return [ /* |-------------------------------------------------------------------------- - | Generic Validation Messages + | Generic Validation Messages - we use these in the jquery validation where we don't have + | access to the :attribute |-------------------------------------------------------------------------- */ - 'invalid_value_in_field' => 'Invalid value included in this field', + 'generic' => [ + 'invalid_value_in_field' => 'Invalid value included in this field', + 'required' => 'This field is required', + 'email' => 'Please enter a valid email address', + ], + ]; diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index 2926bc80b0..ee235d358e 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -979,7 +979,7 @@ dir="{{ Helper::determineLanguageDirection() }}"> }); // Reference: https://jqueryvalidation.org/validate/ - $('#create-form').validate({ + var validator = $('#create-form').validate({ ignore: 'input[type=hidden]', errorClass: 'alert-msg', errorElement: 'span', @@ -997,6 +997,12 @@ dir="{{ Helper::determineLanguageDirection() }}"> onfocusout: function(element) { return $(element).valid(); }, + + }); + + $.extend($.validator.messages, { + required: "{{ trans('validation.generic.required') }}", + email: "{{ trans('validation.generic.email') }}" }); diff --git a/resources/views/licenses/edit.blade.php b/resources/views/licenses/edit.blade.php index 347826eb7d..450e4357a4 100755 --- a/resources/views/licenses/edit.blade.php +++ b/resources/views/licenses/edit.blade.php @@ -11,30 +11,30 @@ @include ('partials.forms.edit.category-select', ['translated_name' => trans('admin/categories/general.category_name'), 'fieldname' => 'category_id', 'required' => 'true', 'category_type' => 'license']) - -@can('viewKeys', $item) -
{{ trans('admin/settings/general.pwd_secure_complexity_help') }}