Form validation not working |
I trying many things to do form validation but it still not working and also documentation is not proper or correct,
can you please give a proper example with a code. otherwise i thing i am wasting my times
We can't really help you if you don't explain what your problem is. What's not working? Can you post some of your code? I assure you it's working and you're probably using it incorrectly.
Codeigniter is simply one of the tools you need to learn to be a successful developer. Always add more tools to your coding arsenal!
Hi, i ran into this same issue.
To replicate it, use a fresh install of CI4, Copy and paste the code example from the user guide Code: TypeError
Hi,
I think i cracked this, so the example was modified as per below and it works: PHP Code: <?php
04-19-2017, 09:20 AM
(This post was last modified: 04-19-2017, 09:22 AM by donpwinston. Edit Reason: screwed up )
helper('form');
$validator = new \CodeIgniter\Form\Validator(); I get a class not found error for Validator. I take it this is not the way to do it but the docs do it this way.
Simpler is always better
(04-19-2017, 09:20 AM)donpwinston Wrote: helper('form'); Er, the docs don't do it your way... https://bcit-ci.github.io/CodeIgniter4/l...he-library Code: $validator = \Config\Services::validation();
(04-19-2017, 10:01 AM)ciadmin Wrote:(04-19-2017, 09:20 AM)donpwinston Wrote: helper('form'); The tutorial does it differently. https://bcit-ci.github.io/CodeIgniter4/t...items.html
Simpler is always better
|
Welcome Guest, Not a member yet? Register Sign In |