Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, October 18, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  JavaScript validation trouble

phpMyEdit General     JavaScript validation trouble
Post new topic   Reply to topic    
 
phuizinga     Joined: 28 Nov 2011   Posts: 1  
Post 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)
Post 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    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy