No. there is a single error_message
On Nov 7, 4:00 pm, Marco Prosperi <[email protected]> wrote: > thank you, but is there any hook to customize the error message if I > don't choose an item (sorry, it was IS_IN_SET, not IS_IN_LIST)? > > On 7 Nov, 17:30, mdipierro <[email protected]> wrote: > > > requires=[IS_NOT_EMPTY(error_message=T('my > > custom message')),IS_IN_LIST(['first','second'])] > > > should be just > > > requires=IS_IN_LIST(['first','second']) > > > if you require the value to be in a list, it cannot be empty. This > > will give you the dropdown. > > > On Nov 7, 9:31 am, Marco Prosperi <[email protected]> wrote: > > > > hi all, > > > still have problems with validators. Why a field defined so in db.py > > > > .. > > > Field('myfield','string',requires=[IS_NOT_EMPTY(error_message=T('my > > > custom message')),IS_IN_LIST(['first','second'])]), > > > .. > > > > doesn't show a drop down list in a SQLFORM but shows 'my custom > > > message' after submit if left empty? > > > > thanks in advance, > > > Marco > >

