Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for phpMyEdit/doc/sgml/configuration.fields.sgml between version 1.48 and 1.49

version 1.48, 2004/04/12 22:20:24 version 1.49, 2004/04/14 20:28:52
Line 1 
Line 1 
 <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.47 2004/04/12 22:14:41 nepto Exp $ -->  <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.48 2004/04/12 22:20:24 nepto Exp $ -->
   
 <!-- Categories:  <!-- Categories:
   
Line 314  $opts['fdd']['col_name']['escape'] = fal
Line 314  $opts['fdd']['col_name']['escape'] = fal
 </para>  </para>
 </sect1>  </sect1>
   
 <sect1 id="configuration.input-validation">  <sect1 id="configuration.javascript-validation">
 <title id="configuration.input-validation.title">Input validation</title>  <title id="configuration.javascript-validation.title">JavaScript validation</title>
 <para>  <para>
   
 &name; users can benefit also from JavaScript scripting language, when  &name; users can benefit from the JavaScript scripting language, when
 validating input values before form is submited.  validating input values before the form is submited.
   
 </para>  </para>
 <bridgehead id="configuration.fields.js.required">Required fields</bridgehead>  <bridgehead id="configuration.fields.js.required">Required fields</bridgehead>
 <para>  <para>
   
 For the most simple validation JavaScript can be generated to prevent null  Simple validation JavaScript can be generated to prevent null
 entries by the user. If an entry is required for a particular field, set the  entries by the user. If an entry is required for a particular field, set the
 <varname>['js']['required']</varname> option to <constant>true</constant>.  <varname>['js']['required']</varname> option to <constant>true</constant>.
   
Line 341  $opts['fdd']['col_name']['js']['required
Line 341  $opts['fdd']['col_name']['js']['required
 <para>  <para>
   
 JavaScript regular expressions can be a powerful way to make interactive input  JavaScript regular expressions can be a powerful way to make interactive input
 validation. When used, input must match desired regular expression defined  validation. When used, input must match the desired regular expression defined
 in&nbsp;the&nbsp;<varname>$opts['fdd']['col_name']['js']['regexp']</varname>.  in&nbsp;the&nbsp;<varname>$opts['fdd']['col_name']['js']['regexp']</varname>.
 If some field does not match, JavaScript warning will be invoked to force user  If a field does not match, a JavaScript alert will be invoked to force the user
 to change entered value.  to change entered value.
   
 <example><title>Regular expression example</title>  <example><title>Regular expression example</title>
Line 355  $opts['fdd']['col_name']['js']['regexp']
Line 355  $opts['fdd']['col_name']['js']['regexp']
 </para>  </para>
 <para>  <para>
   
 Regular expression are written in Perl compatible style. An expression above  Regular expressions are written in Perl compatible style. The expression above
 allows form to submit only when digit/number characters are entered in the  allows the form to submit only when numeric characters
 field. Empty value is also allowed, but you can use  <constant>0-9</constant> are entered in the field. An empty value is also
 <varname>['js']['regexp']</varname> in combination with  allowed, but you can use <varname>['js']['regexp']</varname> in combination
 <varname>['js']['required']</varname> to prevent empty entries.  with <varname>['js']['required']</varname> to prevent empty entries.
   
 </para>  </para>
 <bridgehead id="configuration.fields.js.hint">Hints</bridgehead>  <bridgehead id="configuration.fields.js.hint">Hints</bridgehead>
 <para>  <para>
   
 When <varname>['js']['required']</varname> option is used and entered value is  When the <varname>['js']['required']</varname> option is used and the value
 empty, or field does not match defined <varname>['js']['regexp']</varname>,  entered is empty, or the characters entered do not match the defined
 a&nbsp;warning with default message is printed. Such message can be changed.  <varname>['js']['regexp']</varname>, a&nbsp;warning with the default message
 This is especially useful when regular expression for checking input fields is  is displayed. This message can be changed using
 used and we want to advice user how entered value might look like.  <varname>['js']['hint']</varname>. This is especially useful for advising the
   user about field-specific data input restrictions.
   
 <example><title>JavaScript hint</title>  <example><title>JavaScript hint</title>
 <programlisting><![CDATA[  <programlisting><![CDATA[

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top