Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2227

[3.3.x] Support Forum • Re: Custom Profile Fields Validation and Viewable only by Owner, Admin, Moderators

$
0
0
It also appears that the validation regex may be wrong in phpbb. I tested the regex and some of the data passed on the tester.

some data tested using html form option * (Any letters, numbers, comma, dots, underscores, and dashes beginning with any letter):

regex

Code:

[\p{Lu}\p{Ll}][\p{Lu}\p{Ll}0-9.,\-_]+
test data (with and without spaces):

IMPORTANT: only items marked with * have test form option above, all others are set to (any character)

Version 2.4.58
* cPanel 110.0.12
Linux 86_64
Version 10.6.16-MariaDB-cll-lve-log
version 2.6.32-954.3.5.lve1.4.93.el6.x86_64
* Version 8.1.27
* Chrome 122.0.6261.95 Firefox 123.064-bit

results:
regextest.jpg

however on the user profile page the result is:
custom_profile_field_errors.jpg

So it looks like its failing on spaces.

so adding \x20 seems to take care of the spaces

Code:

[\p{Lu}\p{Ll}][\p{Lu}\p{Ll}0-9.,\-_\x20]+
regextest_final.jpg

Statistics: Posted by durangod — Sat Mar 02, 2024 11:00 pm



Viewing all articles
Browse latest Browse all 2227

Trending Articles