Sorry for the delayed response.
Basically overrides SQLFORM default widgets with my own widgets.
That's all, sorry if my explanation is shallow, but i don't know how to 
explain me in english.
The sourcecode is quite simple maybe another example could help?

El martes, 24 de julio de 2012 15:44:55 UTC-3, Massimo Di Pierro escribió:
>
> Can you tell us more about how it works?
>
> On Tuesday, 24 July 2012 09:38:51 UTC-5, Franco wrote:
>>
>>
>> <https://lh6.googleusercontent.com/-ICahDjG44ak/UA6u1Az37FI/AAAAAAAAAFc/YVBbufNi1q8/s1600/screen.png>
>>
>> Greetings everyone. I want to share with you this plugin, it's based on 
>> jquery-validation-engine plugin.
>>
>> It's easy to use, your only need to replace SQLFORM with JsSQLFORM and 
>> that's it.
>>
>> At this moment only supports 7 validators 
>> (IS_NOT_EMPTY, IS_EMAIL, IS_URL, IS_DATE, IS_LENGTH, IS_INT_IN_RANGE, 
>> IS_FLOAT_IN_RANGE).
>>
>>
>> Here are some examples of use:
>> def validation():
>>
>>
>>
>>     from plugin_ValidationEngine import JsSQLFORM
>>
>>     f = JsSQLFORM.factory(
>>
>>         Field('nombre', requires = [IS_NOT_EMPTY(), IS_LENGTH(20, 3)],label 
>> = 'Nombre'),
>>
>>         Field('apellido', requires = IS_NOT_EMPTY(), label = 'Apellido'),
>>
>>         Field('cuit', requires = IS_LENGTH(12, 12), label = 'Cuit'),
>>
>>         Field('edad', requires = IS_INT_IN_RANGE(18, 65), label = 'Edad'
>> ),
>>
>>         Field('importe', requires = IS_FLOAT_IN_RANGE(1, 9999.99), label 
>> = 'Importe')
>>
>>     )
>>
>>     if f.accepts(request, session):
>>
>>         response.flash = 'Ok'
>>
>>     else:
>>
>>         response.flash = 'Bad'
>>
>>     return dict(form = f)
>>
>>
>>
>>
>> def validation2():
>>
>>     from plugin_ValidationEngine import JsSQLFORM
>>
>>     f = JsSQLFORM(db.test)
>>
>>     if f.accepts(request, session):
>>
>>         response.flash = 'Ok'
>>
>>     else:
>>
>>         response.flash = 'Bad'
>>
>>     return dict(form = f)
>>
>>
>>
>>
>>
>>
>>
>>

-- 



Reply via email to