Closed macedodebrito closed 9 years ago
ok i got it.
you can "fix/rule" it with:
public function getValidationRules()
{
if ((Input::get('imageConfirmDelete')) && (Input::file('image')==null)) {
return [ 'image' => 'required' ];
}
else {
return [];
}
}
Hello!
im getting a problem here:
my form have this configuration:
->form(function () { FormItem::ckeditor('text', 'Body')->required(); FormItem::image('image', 'Image')->required(); FormItem::text('description', 'Description')->required()->attributes(['style' => 'width: 300px']); });
The problem is:
IF i dont use image()->required(), and SAVE, i will lose my image. IF i use ->required(), validation isnt recognizing that ONE image is already setted (the thumb one), and give me a validation error "image is required".
How can i fix this?
I'm using LARAVEL 4.
thanks,