Uci_load_validate -- how to pass a list as default value?

So when using uci_load_validate, I can pass a default value like this: 'force_dns:bool:1', but what if I need to pass a list as a default value?

For now, I've tested I can do this: 'force_dns_port:list(integer):53,853' and then replace comma with space before using the variable. Is there a nicer way of doing this?

PS. I've tried 'force_dns_port:list(integer):"53 853"' and while it doesn't produce errors, the result is:

for i in $force_dns_port; do echo "$i"; done

Does 'force_dns_port:list(port):53 853' work?

No, the eval doesn’t like the dangling 853…hmmm…

I'm guessing JeffreyTo (who authored the commit for uci_load_validate) is not on the forums?

I kinda look at ubox where validate_data lives. If they could wrap the result (val) in quotes, it might work better.

@dave14305 , any chance you'd be interested in sending a patch/PR with the fix?

LOL, anything with a .c extension is above my technical caste. I can mostly read it, but not write it.