Lib Validation : permit empty string for valid_email or extend rule |
Hello everyone, I want to use validation for mail field which is not required. But empty string is not validated. Is there a method to validate it anyway ?
Or the other option I think is to custom the predefined rule "valid_email", is it possible ? In advance, thank you.
you can combine it wih other rule. E.g.
$rules = [ 'email' => 'permit_empty|valid_email', ]; See https://codeigniter.com/user_guide/libra...eneral-use
@xxxx[{::::::::::::::::::::::::::::::::>
|
Welcome Guest, Not a member yet? Register Sign In |