Login   Register  
Icontem

File: examples/main.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Chara Miteo  >  JS Form Validator  >  examples/main.html  >  Download  
File: examples/main.html
Role: Example script
Content type: text/plain
Description: Examples
Class: JS Form Validator
Validate forms according to many rules
Author: By
Last change:
Date: 2014-01-14 05:46
Size: 2,112 bytes
 

Contents

Class file image Download
<html>
<head>
	<title>ApPHP :: JS Auto Form Validator :: Content</title>
	<link href="css/style.css" type="text/css" rel="stylesheet" />
</head>
<body>

<h4>Welcome to JS Auto Form Validator</h4>

<p>
    The JS Auto Form Validator is an easy-to-setup form validation script which enables you to handle the whole form validation process without writing any JavaScript code. This script allows you to specify certain form elements as "required" or "non-required" and also what specific type they have: text, password, numeric, zip code etc.
</p>
<p>
    Select an appropriate link from the left menu to start.
</p>

<p>
<b>Step 1</b>: To start using of JS Auto Form Validator copy & paste these lines between &lt;head&gt; and &lt;/head&gt; tags of your HTML page.<br />
NOTE: you have to define a valid path to all included files.
</p>
<pre>
&lt;SCRIPT type='text/javascript' src='jsafv/chars/jsafv_messages.js'&gt;&lt;/SCRIPT&gt;
&lt;SCRIPT type='text/javascript' src='jsafv/chars/diactric_chars_utf8.js'&gt;&lt;/SCRIPT&gt;
&lt;SCRIPT type='text/javascript' src='jsafv/form.scripts.js'&gt;&lt;/SCRIPT&gt;
&lt;SCRIPT type='text/javascript'&gt;
    var jsFormValidator = new FormValidator();        // create new instance of object
&lt;/SCRIPT&gt;
</pre>

<p>
<b>Step 2</b>: Create HTML form for validation.
</p>
<pre>
&lt;FORM name="frmTest" action="result.html" method="get"&gt;
   ...
   ... your fields here
   ....
   &lt;INPUT onclick="return onSubmitCheck(document.forms['frmTest'])" type="submit" value="Submit" name="butTest" /&gt;
&lt;/FORM&gt;
</pre>
<br />

Usage of Prefixes
<pre>
 r - required, s - simple

 n - numeric,     i - integer,      f - float,
 a - alphabetic,  t - text,         e - email,
 p - password,    l - login,        y - any (generally used for non-english symbols and text),       
 z - zipcode,     v - verified,     c - checked (for checkboxes),
 u - url

 for numbers:   s - signed, u - unsigned,   p - positive,   n - negative
 for strings:   u - upper,  l - lower,      n - normal,     y - any
</pre>

</body>
</html>