From: Eli C. <el...@co...> - 2015-01-08 19:20:22
|
You can create a single-item list by ending your string with a trailing comma, e.g. notify = me...@ex..., - Eli On Thu, Jan 8, 2015 at 2:15 PM, Darren Spruell <pha...@gm...> wrote: > Greetings, > > I have a field in my configuration section that should be set with a > list of one or more email addresses for notification; i.e. either of > these configuration settings would be correct: > > notify = me...@ex... > > notify = me...@ex..., yo...@ex... > > What seems ideal would be for the string_list() validator to accept a > single list item (essentially, the same validation as string()) and > not *only* a list. I sampled it with a 'min' value of 1 but that also > resulted in validation failure with a single value in the field: > > notify = string_list(default=None, min=1) > > Is there a way to accomplish this with the string_list() validator, or > does this require a custom validator? Any chance to see a modification > string_list to support single-item lists if not? > > -- > Darren Spruell > pha...@gm... > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |