[html-formfu] constraint on multi-select elements
Carl Franks
fireartist at gmail.com
Fri Jun 1 11:01:34 GMT 2007
On 01/06/07, Thorsten Domsch <tdomsch at gmx.de> wrote:
> Hello Carl,
>
> here's a snippet from my yml file so you can see how i use the field:
>
> - type: date
> name: justadate
> start_year: 1977
> end_year: 2010
> constraints:
> - Required
> comment: please choose a correct date
>
> so i guess it should be alright... but doesn't work. Error like i wrote
> "no field names to add constraint to at /usr/loc..."
ah, the constraints are being added during the creation of the date
element - before your setup() has run and added the sub-elements.
I think to get around that, you'll have to do something like:
---
elements:
- type: block
name: justadate
start_year: 1977
end_year: 2010
comment: please choose a correct date
constraints:
- type: Required
name: [date_year, date_month, date_day]
More information about the HTML-FormFu
mailing list