Hey guys!!!
In this video on the CodeIgniter 4 framework, I show you how to create validation rules for a “model”, thus enabling the data to go through a check before being inserted (insert) or updated (update).
The way to validate the data is simple, just insert an attribute (in array format) in the model class and in each position of the array you define the rules for each field.
The video is available at: https://www.youtube.com/watch?v=7nsBJKcrMf4&utm_source=rafaelwendel
See more about model validation at the link: https://codeigniter4.github.io/userguide/models/model.html#validating-data
CI4 provides several validation methods, and you can check them all through the link: https://codeigniter4.github.io/userguide/libraries/validation.html?highlight=validation#available-rules
If you have any questions, leave your comment !!!
See you later!