Welcome Guest, Not a member yet? Register   Sign In
Validation: required_with[field_name]
#1

Hi,
I would like to know if any one has come across the same issue with validating form data.
If I would like to make a field required when a different field is of a certain value. Is there a way to do this with Codeigniter 4 core? Or would this need to be created as a custom rule?
PHP Code:
'event_bf' => 'required_with[event_ap.1]' 
So if event_ap === '1' then event_bf is required not otherwise.
Does anyone know of an implementation out there somewhere?

Thanks in advance.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB