diff --git a/app/Http/Requests/ArtikelRequest.php b/app/Http/Requests/ArtikelRequest.php index 0a6bb1605..a274f1991 100644 --- a/app/Http/Requests/ArtikelRequest.php +++ b/app/Http/Requests/ArtikelRequest.php @@ -53,9 +53,10 @@ public function authorize() public function rules() { return [ - 'judul' => 'required', + 'judul' => 'required|string|max:191', 'isi' => 'required', 'status' => 'required', + 'gambar' => 'nullable|image|mimes:jpg,jpeg,png|max:1024', ]; } } diff --git a/catatan_rilis.md b/catatan_rilis.md index 1cb15db71..4f47164da 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -8,6 +8,7 @@ Terima kasih pada syahransaputra yang baru mulai berkontribusi. 1. [#627](https://github.com/OpenSID/OpenDK/pull/627) Perbaikan eror menu keluarga. 2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. -3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaiki sambutan camat kosong -4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaiki preview gambar slider -5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaiki pengisian kolom sejarah. +3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaikan sambutan camat kosong +4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaikan preview gambar slider +5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaikan pengisian kolom sejarah. +6. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. diff --git a/resources/views/informasi/artikel/_form.blade.php b/resources/views/informasi/artikel/_form.blade.php index 5225958e0..2e01c9e49 100644 --- a/resources/views/informasi/artikel/_form.blade.php +++ b/resources/views/informasi/artikel/_form.blade.php @@ -31,7 +31,7 @@ - {!! Form::file('gambar', ['placeholder' => 'Gambar', 'class' => 'form-control', 'id' => 'file-artikel']) !!} + {!! Form::file('gambar', ['placeholder' => 'Gambar', 'class' => 'form-control', 'id' => 'file-artikel', 'accept' => 'jpg,jpeg,png']) !!} @if ($errors->has('gambar')) {{ $errors->first('gambar') }} @endif @@ -58,7 +58,7 @@ $('.textarea').wysihtml5(); - var fileTypes = ['jpg', 'jpeg', 'png', 'jpg']; //acceptable file types + var fileTypes = ['jpg', 'jpeg', 'png']; //acceptable file types function readURL(input) { if (input.files && input.files[0]) {