Closed zoelabbb closed 9 months ago
Can't POST data to DB, I've added the full name field but it doesn't want to be saved. When I remove 'fullname' it will be saved to DB.
Myth-auth/UserModel.php :
protected $allowedFields = [ 'email', 'username', 'password_hash', 'reset_hash', 'reset_at', 'reset_expires', 'activate_hash', 'status', 'status_message', 'active', 'force_pass_reset', 'permissions', 'deleted_at', 'fullname', ]; protected $useTimestamps = true; protected $validationRules = [ 'email' => 'required|valid_email|is_unique[users.email,id,{id}]', 'fullname' => 'required|min_length[3]|max_length[255]', 'username' => 'required|alpha_numeric_punct|min_length[3]|max_length[30]|is_unique[users.username,id,{id}]', 'password_hash' => 'required', ];
Form register :
<div class="col-xl-6"> <label class="form-label fw-bold text-dark fs-6"><?=lang('Auth.fullname')?></label> <input class="form-control <?php if (session('errors.fullname')) : ?>is-invalid<?php endif ?> form-control-lg form-control-solid" type="text" placeholder="<?=lang('Auth.fullname')?>" name="fullname" autocomplete="off" /> </div>
did I do something wrong? Or is there code that I didn't add? I fully use the Myth-auth library to create login, register and reset passwords.
thank you very much for taking the time.
Can't POST data to DB, I've added the full name field but it doesn't want to be saved. When I remove 'fullname' it will be saved to DB.
Myth-auth/UserModel.php :
Form register :
did I do something wrong? Or is there code that I didn't add? I fully use the Myth-auth library to create login, register and reset passwords.
thank you very much for taking the time.