| Index
» Projects
» phpMyEdit
» Forum
» How to validate an email field |
 |
Tiji Thomas
Joined: 25 Jun 2010
Posts: 4
Posted: 2010-06-25 11:41
Back to top
Reply with quote
|
Hello,
I am trying to validate an email field using regular expression. But I can't. Regular expression option is not working for any cases.
I am looking for a solution.
Regards
Tiji
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-06-26 15:33
Back to top
Reply with quote
|
Post your code.
|
Tiji Thomas
Joined: 25 Jun 2010
Posts: 4
Posted: 2010-06-26 16:21
Back to top
Reply with quote
|
$opts['fdd']['lm_user_emailid']['js']['required'] = true;
$opts['fdd']['lm_user_emailid']['js']['regexp'] = '^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$';
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-06-26 17:53
Back to top
Reply with quote
|
does that regex work perfectly in non-phpMyEdit scripts? it looks problematic.
and what happens that causes you to say it does not work, i.e. exactly what occurs?
|
Tiji Thomas
Joined: 25 Jun 2010
Posts: 4
Posted: 2010-06-27 11:53
Back to top
Reply with quote
|
'js' option is working well. But the problem is when I am including 'regexp' the previous one is also not working.
|
|
Post new topic
Reply to topic
|
|
|
|