[web2py] Re: Limiting the number of values that could be input in a form field

2021-12-08 Thread mostwanted
Thanks Clemens this worked: * Field('id_number', requires = IS_MATCH('^\d{9}?$', error_message='An ID Number should have exactly 9 digits')), * On Wednesday, December 8, 2021 at 9:41:45 PM UTC+2 Clemens wrote: > The right link to the chapter in the web2py documentation is: >

[web2py] Re: Limiting the number of values that could be input in a form field

2021-12-08 Thread Clemens
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}$',

[web2py] Re: Limiting the number of values that could be input in a form field

2021-12-08 Thread Clemens
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,