Validation for Multiple Input Requirements? |
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!
|
Messages In This Thread |
Validation for Multiple Input Requirements? - by BhambriRohunu - 08-06-2023, 09:40 PM
RE: Validation for Multiple Input Requirements? - by sammyskills - 08-07-2023, 12:20 AM
|