Welcome Guest, Not a member yet? Register   Sign In
Validation for Multiple Input Requirements?
#1

Do you know if there exists a validation rule that can be employed in situations where a controller can accept multiple inputs, each accompanied by the permit_empty modifier, yet necessitating at least one input to possess a value for functional utility? To elaborate, consider a 'cars' controller endowed with search fields like 'color,' 'style,' and 'engine type' - is there a validation rule that can ascertain the presence of a value in at least one of these fields, regardless of which one? Presently, my approach involves scrutinizing if all fields are void of content and subsequently triggering an exception. However, it would be notably more elegant if the validator could oversee this task. Your insights would be greatly appreciated. Thank you!
Reply


Messages In This Thread
Validation for Multiple Input Requirements? - by BhambriRohunu - 08-06-2023, 09:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB