The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
[\D,]+ digits and comma only validation - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Form Validation: JS + PHP (https://forums.formtools.org/forumdisplay.php?fid=18)
+--- Thread: [\D,]+ digits and comma only validation (/showthread.php?tid=2735)



[\D,]+ digits and comma only validation - johnbleck2 - Nov 20th, 2013

I added a case to the rsv.js but I'm just not getting the regexp right.
The field needs to have just numbers and commas.
These numbers can range from 1-900.

case "digitscommas_only":
if (form[fieldName].value && form[fieldName].value.match(/[\D,]+/))
{
if (!rsv.processError(form[fieldName], errorMessage))
return false;
}
break;

I thought I'd keep it simple with just Digits and comma range, but I'm missing something.

value.match(/[\D,]+/)) is allowing only digits, put a comma in the field and it fails. I tried the unicode variation as well [\D\U+002C]+
I also tried (/[\D\%%C%%]+/)) since the commas are replaced with %%C%% earlier on in the rsv.js, but I believe they are back by this point in the validation function.

[\D,]+ seemed pretty obvious. what am I missing?





RE: [\D,]+ digits and comma only validation - johnbleck2 - Jan 14th, 2014

Instead of writing a new rule in the rsv I utilized reg_exp

rules.push("reg_exp,Sec1_Color_Pages_List,^[0-9]+(?:\\,[0-9]+)*$,Color Page list must have format of number comma number in Section 1")

The reg_exp of ^[0-9]+(?:\\,[0-9]+)*$
did the trick.

valid strings:
1
1,2,3
10,20

Invalid: 1,
or any "non number and comma" combination must end with number not comma


RE: [\D,]+ digits and comma only validation - r.brandao - Sep 2nd, 2015

I need to do something in the field should be input only a value between 18 and 70 , I do not know where to do it. Tried putting range = 18-70 in the Custom Function but it did not work


RE: [\D,]+ digits and comma only validation - r.brandao - Jan 28th, 2016

Lets go guys Up... any body help us?