Hi rctay, some of this is done already. In particular in the example you mention if a "string" field has length=78, you atomtalically get a IS_LENGTH (78) validators. Similarly a date field gets a IS_DATE() validators, etc. This does not apply to 'text' because most databases impose no length contraints on TEXT.
Anyway, I will look into improving this without breaking backward compatibility. Massimo On Dec 31 2008, 8:55 pm, rctay <rcta...@gmail.com> wrote: > Hi, > > i'm wondering if it's possible to add validation based on the field > spec into web2py. > > for example, if a field 'text' has length 25, then the field.requires > list should contain the validator IS_LENGTH(25). this might apply to > conditions like unique, non-empty, as well. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---