scoumbourdis / grocery-crud-codeigniter-4

GNU General Public License v3.0
68 stars 38 forks source link

Set Validation rules are not working according to docs #22

Closed RodrigoFurtado closed 3 years ago

RodrigoFurtado commented 3 years ago

"Set Validation rules" in the docs says we should use 2 arguments for the function https://www.grocerycrud.com/docs/set-validation-rules

But the grocerycrud library demands at least 3 arguments. Too few arguments to function App\Libraries\GroceryCrud::setRule(), 2 passed in D:\xampp\htdocs\portobello\app\project\Admin.php on line 44 and at least 3 expected

image

scoumbourdis commented 3 years ago

Hello @RodrigoFurtado ,

You are right! This is one of the rare cases that community edition has a different syntax than the Grocery CRUD Enterprise edition. If you are using the community edition the syntax is the same as the Codeigniter set rule that you can find here:

https://codeigniter4.github.io/userguide/libraries/validation.html#setrule

I will try to update the documentation asap with this information.

Regards Johnny

scoumbourdis commented 3 years ago

I've just updated the documentation: https://www.grocerycrud.com/docs/set-rule

Closing this ticket.