EAN code required otherwise laravel error
This commit is contained in:
parent
5e86a0976f
commit
cfb3973639
3 changed files with 3 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ class StoreProductRequest extends FormRequest
|
|||
{
|
||||
return [
|
||||
'name' => 'required|string|min:2|max:255',
|
||||
'code_ean' => 'required|numeric',
|
||||
'picture' => [
|
||||
'image',
|
||||
'mimes:jpeg,png,jpg',
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class UpdateProductRequest extends FormRequest
|
|||
{
|
||||
return [
|
||||
'name' => 'required|string|min:2|max:255',
|
||||
'code_ean' => 'required|numeric',
|
||||
'picture' => [
|
||||
'image',
|
||||
'mimes:jpeg,png,jpg',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label for="code_ean">Code EAN</label>
|
||||
<input type="text" id="code_ean" name="code_ean" class="form-control" placeholder="code_ean" value="{{ old('code_ean', $product->code_ean ?? '') }}">
|
||||
<input type="text" id="code_ean" name="code_ean" class="form-control" placeholder="code_ean" value="{{ old('code_ean', $product->code_ean ?? '') }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="picture">Image *<small class="text-muted">- JPEG/PNG, 2Mo max. Dimensions {{ Config::get('theme.product_image_maxwidth') }} px par {{ Config::get('theme.product_image_maxheight') }} px</small></label></br>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue