Thank you!
On Wednesday, December 19, 2012 7:04:03 PM UTC-5, Massimo Di Pierro wrote:
>
> Here is a custom validator that replaces '-' with '_'
>
> class MyValidator(obejct):
> def __call__(self,value):
> return (value.replace('-','_'), None)
>
> Field(..., requires=MyValidator()...)
Here is a custom validator that replaces '-' with '_'
class MyValidator(obejct):
def __call__(self,value):
return (value.replace('-','_'), None)
Field(..., requires=MyValidator()...)
On Wednesday, 19 December 2012 16:54:21 UTC-6, wwwgong wrote:
>
> I thought validator only validates
I thought validator only validates, can you show me how to update field
with the sanitized value.
Thanks,
On Wednesday, December 19, 2012 9:57:48 AM UTC-5, viniciusban wrote:
>
> Try a custom validator to sanitize your description field.
>
>
> On Wed, Dec 19, 2012 at 12:06 PM, wwwgong >
> wrote
Try a custom validator to sanitize your description field.
On Wed, Dec 19, 2012 at 12:06 PM, wwwgong wrote:
> Hi,
> I like to store youtube videos into a table:
>
> db.define_table('youtube',
> Field('code'),
> Field('description')
> )
>
> def youtube_repr(code,width=400,height=250):
Hi,
I like to store youtube videos into a table:
db.define_table('youtube',
Field('code'),
Field('description')
)
def youtube_repr(code,width=400,height=250):
return XML("""
http://www.youtube.com/v/%(code)s&hl=en_US&fs=1&">
http:/
5 matches
Mail list logo