Welcome, Guest
Username: Password: Remember me

TOPIC: Php error message when validatining email with Regex

Php error message when validatining email with Regex 2 years 2 months ago #83230

  • jtrigo
  • jtrigo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Hello,
I have two surveys, sharing the same php and the same template, and i have in both surveys the same question (email?) configured with the same validation string : /^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/. Both these question are short free text, no mandatory.

The error I got in one of the surveys is (the other is ok): Notice: Undefined variable: subqValidEqn in E:\...\classes\expressions\LimeExpressionManager.php on line 1949

When i clear the validation string fromthe problematic survey, everything works fine.

I'm using
$versionnumber = "1.92+";
$dbversionnumber = 155;
$buildnumber = '120517';

Any hint? Thanks
J Trigo
Last Edit: 2 years 2 months ago by jtrigo.
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 months ago #83237

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Odd. Is one a validation of a token?

Can you attach the problematic survey?
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 months ago #83246

  • jtrigo
  • jtrigo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
No, it's not a validation of a token

Here goes the file.

Thanks again
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 months ago #83255

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
I don't see the file. Please attach it again.
The administrator has disabled public write access.
The following user(s) said Thank You: jtrigo

Re: Php error message when validatining email with Regex 2 years 2 months ago #83258

  • jtrigo
  • jtrigo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
surveyProblemsRegex.lss
Here goes the file
Last Edit: 2 years 2 months ago by jtrigo. Reason: File was missing
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 months ago #83264

  • jtrigo
  • jtrigo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Let's see if this time I can upload the survey...
surveyProblemsRegex (1).lsswww.limesurvey.org/forum/design-issues/8...ail-with-regex/post#
surveyProblemsRegex.lss
Last Edit: 2 years 2 months ago by jtrigo.
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 months ago #83390

  • jtrigo
  • jtrigo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 5
  • Karma: 0
Recalling: I placed a global validation and I got an notice error. I took it out and the error disapeared. In another survey the same validation produced no error. The problem was in another question. When I changed that one, everything was fine. The question with problem:

# Name [ID] Relevance [Validation] (Default) Text [Help] (Tip)
G-0 Secção IA - Identificação da empresa
[GID 3] 1
Q-4 *ueRespTelef
[QID 122]
Numerical input [N] 1
(VALIDATION: ((ueRespTelef.NAOK >= (0)) and (is_empty(ueRespTelef.NAOK) || ueRespTelef.NAOK <= (999999999)))) 1.4. Telefone
(TIP:
if((is_empty(0) && is_empty(999999999)), '', if(is_empty(999999999), sprintf('Each answer must be at least %s', fixnum(0)), if(is_empty(0), sprintf('Each answer must be at most %s', fixnum(999999999)), if((0) == (999999999), sprintf('Each answer must be %s', fixnum(0)), sprintf('Each answer must be between %s and %s', fixnum(0), fixnum(999999999))))))
)
Question Attribute Value
hide_tip 1
max_num_value_n 999999999
min_num_value_n 0
num_value_int_only 1
text_input_width 15

Thanks TMSWhite
The administrator has disabled public write access.

Re: Php error message when validatining email with Regex 2 years 2 days ago #86182

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
jtrigo wrote:
I have two surveys, sharing the same php and the same template, and i have in both surveys the same question (email?) configured with the same validation string : /^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/.
There is an interesting blog post at www.limesurvey-consulting.com which describes different methods of validating email addresses:
"How to validate email addresses at Limesurvey"

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.169 seconds
Donation Image