The right link to the chapter in the web2py documentation is:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#IS_MATCH
On Wednesday, December 8, 2021 at 8:35:17 PM UTC+1 Clemens wrote:
> I didn't test it, but this should do the job:
> requires = IS_MATCH('^\w{1,9}$', error_message='must be 1 to 9
> characters/digits')
>
> For further information about validators with regular expressions have a
> look here:
> http://web2py.com/book/default/chapter/07?search=formstyle#IS_MATCH
>
> On Wednesday, December 8, 2021 at 8:23:01 PM UTC+1 mostwanted wrote:
>
>> Is there a validator that could be used to limit the number of values
>> that could be submitted in a form field? I want users to input their ID
>> numbers but they cant be more than 9 characters, how do i achieve this?
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/d8e04495-a4b6-4441-811f-e6afc4b419d5n%40googlegroups.com.