Welcome Guest, Not a member yet? Register   Sign In
Problem with validation
#1

Please, give me an advice

If he has an item in the form that can remain empty (the user does not have to fill it in), then I have a problem with validation.

For example, I have an email item that does not need to be filled out
Code:
<input type = "text" name = "email" value = "<? php echo set_value ('email');?>" size = "50" />

But I have a validation written on it, which in my opinion should take place only when something is entered in the item.
Code:
'email' => ['label' => 'Email Address', 'rules' => 'valid_email|max_length [150]']

If I do not fill in the email and send the form, it reports the error "The Email Address field must contain a valid email address."

Can you please advise me what to do with it?

Thank you
Reply


Messages In This Thread
Problem with validation - by PeVal - 09-23-2021, 06:48 AM
RE: Problem with validation - by janeiro - 09-23-2021, 01:28 PM
RE: Problem with validation - by includebeer - 09-23-2021, 02:45 PM
RE: Problem with validation - by PeVal - 09-23-2021, 11:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB