The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
reg_exp problems - 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: reg_exp problems (/showthread.php?tid=1740)



reg_exp problems - Dogen - Nov 8th, 2011

I need to validate an e-mail field with the following format:

first.last@dfw.wa.gov

The expression I've come up with validates perfectly in regex validation tools, but when applied to the validation script it does not seem to work correctly.

rules.push("reg_exp,email,^([a-zA-Z-']+)\.([a-zA-Z-']+)@(dfw|DFW)\.(wa|WA)\.(gov|GOV)$,Please enter your WDFW e-mail address in the following format: first.last@dfw.wa.gov");

The first or last names may contain alpha characters, dashes and/or apostrophes. The validation script does not like the begin/end string characters but if I leave them out a person could enter name.name.name.name@dfw.wa.gov

Any advice would be appreciated!




RE: reg_exp problems - Ben - Nov 8th, 2011

Hi Dogen,

Yeah, I think I ran into this problem myself. Try double-escaping any backslashes.... I think that may have resolved it for me.

- Ben


RE: reg_exp problems - Dogen - Nov 8th, 2011

I think that solved it. Thanks Ben! I was batting my head against a wall trying to figure out why it wasn't working once inserted into the validation script.

(Nov 8th, 2011, 10:09 AM)Ben Wrote: Hi Dogen,

Yeah, I think I ran into this problem myself. Try double-escaping any backslashes.... I think that may have resolved it for me.

- Ben




RE: reg_exp problems - Ben - Nov 10th, 2011

Excellent! Smile