Welcome Guest, Not a member yet? Register   Sign In
File Validation with redirect
#3

Good morning

I tried your code but i got still errors

This is my view code, I want to display the errors per each form field
This is working in EVERY other Controller/View Combination as posted below
Only the file upload will not work like this

PHP Code:
<?= form_label(lang('system/auth/pages/edit_profile_image.form.label.profile_image'), 'profile_image', ['class' => 'form-label']); ?>
<?= form_upload
('avatar'set_value('avatar'$user->profile_image), ['autocomplete' => 'off''class' => 'form-control'.$viewData['bs_form_control_size'].((session()->has('validation') && session('validation')->hasError('avatar'))?' is-invalid':'').((session()->has('validation') && !session('validation')->hasError('avatar'))?' is-valid':''), 'id' => 'profile_image']); ?>
<?= 
(session()->has('validation') && session('validation')->getError('avatar'))?'<div class="form-text text-danger fw-bold">'.session('validation')->getError('avatar').'</div>':''?>

Why can i give class to session in other controllers and here its not workin?

Greetz
pyst4r1983
Reply


Messages In This Thread
File Validation with redirect - by pyst4r1983 - 11-02-2021, 07:54 AM
RE: File Validation with redirect - by manager - 11-03-2021, 12:37 AM
RE: File Validation with redirect - by pyst4r1983 - 11-09-2021, 02:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB