field username in auth_user

17 views
Skip to first unread message

Andrea Fae'

unread,
Jun 19, 2018, 3:20:59 PM6/19/18
to web2py-users
What kind of characters can we use in this field?
Can I use space character in this field? I think no.
thank you

Dave S

unread,
Jun 19, 2018, 4:42:11 PM6/19/18
to web2py-users

You might try a "non-breaking space".  In unicode, that U+00A0
<URL:http://www.fileformat.info/info/unicode/char/00a0/index.htm>

/dps
 

Anthony

unread,
Jun 19, 2018, 5:44:03 PM6/19/18
to web...@googlegroups.com
By default it must match the following regular expression:

'[\w\.\-]+'

So, no spaces. I suppose you could override the default validator and allow spaces, but I'm not sure if that has any consequences for uses of the username elsewhere in the Auth system (after a quick review, I don't see any obvious problems -- so maybe try it and see if all the Auth functionality works as expected).

Anthony
Reply all
Reply to author
Forward
0 new messages