Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
Abstract Offline
New Member
 
Posts: 10
Join Date: Jan 2008
Regular Expression Validation - 28-01-2008, 09:32 PM

Hi Everyone,

I got a problem with the Regular Expression Validation of custom fields. I have set the following regular expression in a custom text input field:

^[A-Za-z0-9._\-]+@{1,1}[A-Za-z0-9._\-]+\.[A-Za-z]{2,3}$

When I submit a ticket and fill in 'test@test.com' in this custom field I get the following error for the field:

'One of the required field(s) is empty'

I tested the same expression in a simple php script with the ereg function and it works without a problem. Anyone knows what the problem is?

Thank Arian

Last edited by Abstract; 28-01-2008 at 09:41 PM..
   
Reply With Quote
  (#2) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,668
Join Date: Jan 2006
Location: United Kingdom
29-01-2008, 12:08 PM

Hi Abstract,

Have you tested the regex with the preg_match PHP function?


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#3) Old
Abstract Offline
New Member
 
Posts: 10
Join Date: Jan 2008
Fixed - 29-01-2008, 07:51 PM

Hi Jamie,

The regular expression didn't work in preg_match because I forgot the delimiter in the expression. Which is not needed by the function ereg.

When I fill in this
/^[A-Za-z0-9._\-]+@{1,1}[A-Za-z0-9._\-]+\.[A-Za-z]{2,3}$/

it works for validating email addresses

Thanks Jamie
   
Reply With Quote
  (#4) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,668
Join Date: Jan 2006
Location: United Kingdom
29-01-2008, 07:54 PM

No problem For everyone else's reference; PHP: preg_match - Manual


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
Reply

Tags
expression, regular, validation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS feed and XHTML validation bear How do I? 3 14-10-2007 02:17 PM
How do I make Guest Validation Pending Kevin Bell How do I? 3 17-08-2007 10:54 PM
xHTML Transitional Validation AllureHost Duplicate Requests 1 24-01-2007 11:44 PM
Date Validation napogula@in.ibm.com SupportSuite, eSupport and LiveResponse 1 28-09-2006 12:09 PM



Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Help desk software by Kayako.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48