CodeIgniter Forums
Validation Rule to Confirm if Field Value Exists in DB Table - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29)
+--- Thread: Validation Rule to Confirm if Field Value Exists in DB Table (/showthread.php?tid=69750)



Validation Rule to Confirm if Field Value Exists in DB Table - natanfelles - 01-12-2018

The is_unique rule checks if a field already have a value to avoid duplicates.

What about a rule to confirm if a value exists in a table field?

That could be used to do relationship and validate for new rows that needs Foreign Keys.