Welcome Guest, Not a member yet? Register   Sign In
custom validation rule for IP in form
#9

How about the check() function? http://codeigniter.com/user_guide/librar...te-1-value

PHP Code:
$validation->check($value'required'); 

Maybe you can call your validation with something like this:
PHP Code:
if ( ! $validation->check($request->getIPAddress(), 'yourIpValidationRule')) {
    // Throw exception...

CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
custom validation rule for IP in form - by xPooky - 12-12-2020, 05:29 PM
RE: custom validation rule for IP in form - by includebeer - 12-13-2020, 04:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB