I first must say that I have developed 2 different web applications using 
Django in the past and I am very impressed and encouraged by what web2py 
can offer to the web framework community. However, I am having trouble 
carrying out a seemingly simple task without much ado after reviewing all 
the documentation and traditional "googling" methods.
 
Suppose I have a database table with a field named 'fullName'. When the 
user submits a crud.create form with the data 'jOhN DoE', I would like for 
this entry to be saved into the database as 'John Doe' (i.e. - title case). 
In addition, I would like to be able to use the IS_IN_DB requirement 
validator to disallow any variant of this entry to be entered in the 
future. For example, if a user enters 'john doe', 'JOHN DOE', or 'JoHn 
DoE', they should all be recognized as an entry that is already in the 
database (i.e. - I would like a case insensitive check).
 
I have tried to use the represent attribute on the field, however that 
doesn't seem to affect the actual data that is saved in the database. I 
have tried to use a custom onvalidation function, but it doesn't seem to 
work well either. The only way I have seen that really seems to work is 
having a separate database field (i.e. - two fields for the same database 
object). Has anyone run into this situation and found a more eloquent 
solution?
 
Thanks in advance for any help you can provide!
 
Dave
 

-- 



Reply via email to