you can define them yourself

IS_INT=IS_IN_IN_RANGE(-10**10,10**10)

On Apr 18, 4:51 am, Timmie <timmichel...@gmx-topmail.de> wrote:
> Hello,
> how can I build a optional integer or double field in my model?
>
> I fond something at:
>
> SQLField of type 'integer' cannot be optional?
> (http://groups.google.com/group/web2py/browse_thread/thread/
> e0147c80b5e079e1/f820f70ad4b9c89e?lnk=gst&q=optional+form+fields#)
>
> But the explanation requires that I define a range:
>
> db.table.field.requires=IS_NULL_OR(IS_INT_IN_RANGE(-100,100))
>
> db.table.field.requires=IS_NULL_OR(IS_FLOAT_IN_RANGE(-100,100))
>
> What I use if I do not intend to set a value range?
> (From -infinite-dimensional to +infinite-dimensional)
>
> It would be nice to be able to have:
> db.table.field.requires=IS_NULL_OR(IS_INT)
> db.table.field.requires=IS_NULL_OR(IS_FLOAT)
>
> but according to the manual, such validators are not available.
>
> Could such functionality be added to the core?
>
> Thanks & regards,
> Timmie
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to