>From the manual:

A field also has methods. Some of them are used to build queries and we 
will seem them later. A special method of the field object is validate and 
it calls the validators for the field.

print db.person.name.validate('John')
which returns a tuple (value, error). error is None if the input passes 
validation.

Go to this link http://web2py.com/books/default/chapter/29/6#Migrations and 
scroll up one paragraph.

Then look at this http://web2py.com/books/default/chapter/29/7#Validators for 
details about the validators.  There are lots.

On Monday, August 27, 2012 5:20:24 PM UTC-4, Andrew Evans wrote:
>
> yes I have a peculiar SQL query that is using ACOS(), COS() etc for 
> geolocation. I would love to use DAL but it is for a mobile device :D
>
> *cheers
>
>
>
>
> On Mon, Aug 27, 2012 at 2:11 PM, Anthony <[email protected] 
> <javascript:>>wrote:
>
>> Is there a reason you can't use the DAL to do the insert?
>>
>>
>> On Monday, August 27, 2012 4:32:09 PM UTC-4, Andrew Evans wrote:
>>>
>>> How can I escape the data submitted by my form to prevent SQL Injection. 
>>> I read using request.post_vars does not escape the data, I am using a form 
>>> built in HTML and submitting the data passing request.post_vars as 
>>> variables to my SQL Query.
>>>
>>> Any ideas
>>>
>>> *cheers
>>>
>>>
>>>  -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to