Hi,

(this is somewhat related to my post
http://groups.google.com/group/web2py/browse_thread/thread/fa10eaed0565262b)

i noticed that there is a somewhat inconsistent usage of the
'requires' attribute as a list sometimes and a scalar at others.

for example, in the SQLFORM __init__ treats the field 'requires' as a
scalar, while the validation method in INPUT makes sure it is a list.

i hope that the 'requires' field is a list by default (at construction
time).

this would not only help in type safety, it would also be convenient
for the user, who can just do

  field.requires.append(IS_NOT_EMPTY())

and he wouldn't overwrite the automatically-generated validator
(although he could do something like

  field.requires = [IS_NOT_EMPTY(), field.requires]
)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to