| Index
» Projects
» phpMyEdit
» Forum
» JavaScript validation trouble |
 |
phuizinga
Joined: 28 Nov 2011
Posts: 1
Posted: 2011-11-28 12:30
Back to top
Reply with quote
|
I am having difficulties getting JS validation to actually do something. Please consider this code snippet:
| Code: |
$opts['fdd']['kvk'] = array(
'tab' => 'Bedrijfsgegevens',
'name' => 'KvK nr',
'options' => 'LACPV',
'help' => 'Kamer van Koophandel dossiernummer',
'select' => 'N',
'maxlen' => 11,
'js' => array(
'required' => true,
'regexp' => '\d{1,11}',
'hint' => 'KvK nummer moet uit cijfers bestaan.'
),
'sort' => true
);
|
I test this with an empty entry but there is no error. Same with other (text) fields. It would appear the checks are not carried out at all.
Am I overlooking something? Do I need to turn something on in my server configuration for this to work?
By the way, thanks for a great productivity tool. I love it.
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2011-11-28 15:21
Back to top
Reply with quote
|
I don't use regular expressions very often.
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.javascript-validation.html
Wondering if the missing opening and closing slash (/) characters are the problem.
|
|
Post new topic
Reply to topic
|
|
|
|