<<BACK    HOME    CNCPT    TTRL    JSsf.net/projects/validateformjs[ u | s | M | ? ]
   rqd dec eml int len mcr bss trm sifAll Concepts
   frm txt pwd txa rdo sl1 chk slmAll Object Types

validate_form.js

validate_form.js is a comprehensive and easy-to-use solution for enforcing the most common requirements in html forms. Features a small client download, and fully-configurable user-error messages. Optional features--which are not downloaded until explicitely activated by you--include debugging output, and the new Permanent VF-Diagnostics toolbar.

Current version is 1.9b, as of Monday, July 05, 2004.

Table of Contents
  Section Description
GO Concepts and Object Types Documentation and interactive examples for every concept and object type
GO Tutorial Getting started with the basic concepts
GO JavaScript Code API for all public classes and functions
GO The official site for validate_form.js
GO Installation Installation and build instructions
GO Attributes and Special String list Every available attribute and special string
GO Unit tests Verification with code snippets
GO Compression statistics Detailed information on the compression process for every JavaScript file
GO Appendix Secondary documentation
GO Copyright Notice validate_form.js is released under the BSD License (with no advertising clause)




TOP     Appendix

Build log files




BACK     Known issue: Element names containing "[" and "]"

It is expected that all element names only contain letters, digits and underscores. Also, you must ensure that no two non-radio/non-checkbox elements have the same name. Not following these rules may cause unpredictable behavior.

These naming requirements preclude the use of arrays within form element names. However, there is a workaround:

I've not verified this, although the concept seems to be a valid one. Anyone have experience with this? A truly working example would be helpful. Thanks.

<HTML><HEAD>
   <SCRIPT LANGUAGE="JavaScript" SRC="../js_maxc/validate_form.js" TYPE="text/javascript"></SCRIPT>
   <SCRIPT LANGUAGE="JavaScript">
   <!--
      function isFormValid(f_orm)  {
         var sPrefix = '       --';

         f_orm.your_name = f_orm.name[1];
         f_orm.your_name.sMsgRequired = 'What is your name?';

         var sErrors = getFormErrorMsgs(f_orm, sPrefix, 2);

         if(sErrors != '')  {
            alert("ERRORS FOUND\n\n" + sErrors");
            return false;
         }

         return true;
      }
   //-->
   </SCRIPT>
</HEAD><BODY>
   <FORM onSubmit="return isFormValid(this);">
      <BR>What is your name?  <INPUT TYPE="text" NAME="name[1]"><HIDDEN TYPE="text" NAME="your_name">
      <P><INPUT TYPE="submit"></P>
   </FORM>
</BODY></HTML>




TOP     SourceForge.net

validate_form.js is hosted by sourceforge.net.

  • ... Project page
  • ... Latest documentation at validateformjs.sourceforge.net
  • ... Downloads
  • ... CVS access
  • ... User forums
  • ... Mailing lists
  • ... Bug database
  • ... Request an enhancement
  • ... News

 




TOP     Table of Contents: Attributes

This is a complete listing of validate_form.js' attributes and special strings (~FOR_EXAMPLE~). Special strings are put into the value of the 'sMsg*' attribute, and are replaced with the value as described below. When the value is not avaliable, the special string itself is displayed.:

THE FORM ITSELF

ALL ELEMENT TYPES (text/password/textarea/radio/select-one/checkbox/select-multiple)

EXCLUSIVE TO text/password:

EXCLUSIVE TO text/password/textarea

EXCLUSIVE TO checkbox/select-multiple




TOP     Companies who use validate_form.js

Here are a list of companies and individuals that use validate_form.js in their real-world projects:

If you use and enjoy validate_form.js, please consider adding your name or company to this list. I am grateful. Thanks :'  ).




TOP     Copyright Notice

View the full text of the BSD License.


validate_form.js:  A comprehensive solution for validating the most common rules in HTML forms.
http://sourceforge.net/projects/validateformjs

Copyright (C) 2003-2005, Jeff Epstein
All rights reserved.

Modifications: No

Redistribution in binary form, with or without modifications, are permitted provided that the following conditions are met:

   * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
   * If modifications are made to source code then this license should indicate that fact in the "Modifications" section above.
   * Neither the author, nor the contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

[NOTE:  This license contains no advertising clause.]






















SourceForge.net Logo

Copyright (C) 2003-2005, Jeff Epstein.   All rights reserved.