[CodeIgniter 4 video lesson] – Models – Validating data in CI4

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!

He has a degree in Information Systems, a postgraduate degree in Database Systems and a master's degree in Education with a focus on Sociocommunity Technologies. He works as a teacher of technical and technological education at the Federal Institute of Education, Science and Technology of São Paulo, teaching subjects in the areas of programming, database, project development and software engineering.

Posts relacionados

Leave a Reply

Your email address will not be published. Required fields are marked *