On Tue, 2011-05-03 at 17:31 +0100, Chris Withers wrote:
> Hi All,
> 
> What's the correct way to limit the number of entries in a 
> SequenceSchema node?
> 
> The requirements is something like "each job must have at least one 
> requirement line, but no more than 5"

Not sure if you mean UI or validation, but:

- UI wise: use the min_length and/or max_length parameters to
SequenceWidget.  See
http://deformdemo.repoze.org/sequence_of_constrained_len/

Validation-wise, put a validator on the schema node, see the same
example.

> 
> I'm also keen to know if anyone has done a widget which uses a 
> <textarea> to produce a sequence of strings, rather than the JS "add one 
> as a time" approach?

See http://deformdemo.repoze.org/textareacsv/

- C


> 
> cheers,
> 
> Chris
> 
> -- 
> Simplistix - Content Management, Batch Processing & Python Consulting
>             - http://www.simplistix.co.uk
> 


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to