Welcome Guest, Not a member yet? Register   Sign In
Validation of Empty Fields
#8

[eluser]xwero[/eluser]
Should the field only have a value or should it be valid. With a single checkbox it's clear but with a text input it's a bit trickier.
Code:
$rules['email'] = 'required|valid_email';
$rules['confirm_email'] = 'required[email]|valid_email';
If you enter a bad e-mail address and you only check if the field has a value the confirm_email validation doesn't need to run.


Messages In This Thread
Validation of Empty Fields - by El Forum - 03-28-2008, 06:50 PM
Validation of Empty Fields - by El Forum - 03-31-2008, 06:58 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 07:24 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 07:32 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 07:42 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 07:55 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 08:24 AM
Validation of Empty Fields - by El Forum - 03-31-2008, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB