problem with form and validation |
Hello.
I am using CI4. I have a form with a dropdown and I can't get validation to work. I tried putting a required in the dropdown itself and it didn't work either. The code goes below. PHP Code: $val=$this->validate([ PHP Code: <?php echo form_dropdown('produto',$dropProdutos,'null',['class'=>'form-control']) ?>
Solved: I forgot that zero is also a natural number. I had to use "is_natural_no_zero".
Please edit your post title and add [SOLVED] to it so other users can see its been solved.
Thank you. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |