Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Anthony
On Saturday, May 19, 2018 at 8:59:30 AM UTC-4, Anthony wrote: > > On Saturday, May 19, 2018 at 4:32:49 AM UTC-4, mweissen wrote: >> >> Hi Anthony, >> do you have an answer for the second problem? >> > > No, other than to submit a Github issue (or better yet, a pull request). > SQLFORM.accepts

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Martin Weissenboeck
Ok, thank you again! 2018-05-19 14:59 GMT+02:00 Anthony : > On Saturday, May 19, 2018 at 4:32:49 AM UTC-4, mweissen wrote: >> >> Hi Anthony, >> do you have an answer for the second problem? >> > > No, other than to submit a Github issue (or better yet, a pull request). >

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Anthony
On Saturday, May 19, 2018 at 4:32:49 AM UTC-4, mweissen wrote: > > Hi Anthony, > do you have an answer for the second problem? > No, other than to submit a Github issue (or better yet, a pull request). SQLFORM.accepts does convert to a list for insertion into the database but fails to copy the

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Martin Weissenboeck
Hi Anthony, do you have an answer for the second problem? I want to get the number of items in the list "auswahl": form = SQLFORM.factory( Field("auswahl", "list:string"), ) - If there is only one item in "auswahl" then the type of form.vars.auswahl is string and

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-18 Thread Martin Weissenboeck
Thank you very much. I have read the book very often, but I did not remember this chapter. 2018-05-18 17:03 GMT+02:00 Anthony : > On Wednesday, May 16, 2018 at 1:35:02 PM UTC-4, mweissen wrote: >> >> I understand that there is no DEFAULT VALIDATOR for 'list:string', but it

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-18 Thread Anthony
On Wednesday, May 16, 2018 at 1:35:02 PM UTC-4, mweissen wrote: > > I understand that there is no DEFAULT VALIDATOR for 'list:string', but it > seems that is not possible to use IS_LENGTH at all. > See the end of this section:

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
I understand that there is no DEFAULT VALIDATOR for 'list:string', but it seems that is not possible to use IS_LENGTH at all. Ok, I have used onvalidation. Another problem: form = SQLFORM.factory( Field("auswahl", "list:string"), ) If there is only one item in "auswahl" then the

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Kiran Subbaraman
Yikes, I meant "default validators". My mistake. On 16-05-2018 22:43, Kiran Subbaraman wrote: According to the documentation (http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types), `list:string` does not have a validator. Maybe you can create your own?

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Kiran Subbaraman
According to the documentation (http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types), `list:string` does not have a validator. Maybe you can create your own? On 16-05-2018 22:26, Martin Weissenboeck wrote: That is ok: form = SQLFORM.factory(        

[web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
That is ok: form = SQLFORM.factory( Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)), ) This does not work: form = SQLFORM.factory( Field("auswahl", "list:string", length=15, requires=IS_LENGTH(15,3)), ) ​Regards, Martin​ -- Resources: -