Custom helper with input validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Custom helper with input validation (/showthread.php?tid=58074) |
Custom helper with input validation - El Forum - 05-12-2013 [eluser]Fredrik-s[/eluser] My idea: - Create a custom helper which could be loaded when checking a input field for min length. - Creating it as a helper so it could be re-used in different files and keeping it organized and clean. My controller code below (application/controllers/registration.php): - Helper "error" below is my own created helper being loaded. - callback_min_length[2] is my attempt to send the value to the helper function Code: // Load helper My custom helper code below (application/helpers/error_helper.php): Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); I get no output what so ever, not even error message. What am I doing wrong? |