Hi Timmie, the IS_IN_SET_OR validator code could be used in your situation but it would limit the range of possible values, i.e. it is not as open ended as you want:
<QUOTE> But what do I do if I want to give the users the option to 1) select from previous entries OR 2) add new data like: > > <select> > > <option value="volvo">Volvo</option> > > <option value="saab">Saab</option> > > <option value="mercedes">Mercedes</option> > > <option value="new_value">Enter New Item</option> > > </select> </QUOTE> but that limitation is a good thing to have, otherwise you end up with unwanted data in the DB. > Any chance that I can do > > db.mytest.person.requires=IS_NULL_OR(IS_ALPHANUMERIC(), IS_IN_DB(db, > 'dogs.dog_name', > '% > (dog_name)s')) > > where IS_IN_DB could also be IS_IN_SET. > Not currently, IS_NULL_OR has two parameters: other (a validator) and null (the value returned on null imput). Denes. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---