Form Validation validating blank values with min_length and valid_email rules |
I need to update database table columns only if valid fields are received in the request.
If a field is received with a blank value '', the validation rules must be applicated or not? Why is a blank value '' accepted when the min_length[5] (strlen('') equals 0, less then 5) and valid_email ('' is not a valid email address) rules are set? If proceed the columns will be populated with blank values... But this can not happen! How to solve this? Please, check the code: PHP Code: <?php I see that it is intentional. But is correct and I have not understand something? |
Welcome Guest, Not a member yet? Register Sign In |