Ah cool.

Thanks,

Chris

On Wed, Aug 31, 2011 at 10:30 PM, Anthony <abasta...@gmail.com> wrote:
> CLEANUP does not actually take a list of ascii codes as an argument.
> Instead, it takes a regular expression, which defaults
> to '[^\x09\x0a\x0d\x20-\x7e]'.
> Anthony
>
> On Wednesday, August 31, 2011 5:18:43 PM UTC-4, leftcase wrote:
>>
>> Hi folks,
>>
>> I'm having a bit of mental blank.
>>
>> I'm trying to create a validator in the model for a postcode entry in
>> SQLFORM to strip all spaces and non-alphanumeric characters like this:
>>
>> db.data.postcode.requires=[IS_NOT_EMPTY(), CLEANUP([48-57,65-90,97-122])]
>>
>> I'm getting the following error:
>>
>> <type 'exceptions.TypeError'>(unhashable type: 'list')
>>
>> What am I doing wrong? :-S
>>
>> Thanks
>>
>> Chris
>

Reply via email to