Currently when I want to validate a select box I need to include all the values within the validation field.
public static $rules = array(
'type' => array('required', 'in:a,b,c,d')
);
Is there a best practise way to do this using an array?
For example: I have a long list of country names and want to include this as the validation list. The hacky way of doing this would be something along the lines of:
public static $rules = array(
'type' => array('required', 'in:'.implode(',', $countries))
);
Thanks