summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/Validation.page
diff options
context:
space:
mode:
authorxue <>2006-02-22 02:46:25 +0000
committerxue <>2006-02-22 02:46:25 +0000
commitfceb3741d3b0c1e00e81a4a24caf7d49a86896b4 (patch)
treeb2d7f92eaacc92111701c493b91da9d882f580be /demos/quickstart/protected/pages/Controls/Validation.page
parent0922e304fb1d7fc2e486d7020e65e011b9f13e0d (diff)
Updated some validators and relevant demos.
Diffstat (limited to 'demos/quickstart/protected/pages/Controls/Validation.page')
-rw-r--r--demos/quickstart/protected/pages/Controls/Validation.page39
1 files changed, 26 insertions, 13 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Validation.page b/demos/quickstart/protected/pages/Controls/Validation.page
index 74925447..fe801183 100644
--- a/demos/quickstart/protected/pages/Controls/Validation.page
+++ b/demos/quickstart/protected/pages/Controls/Validation.page
@@ -12,7 +12,7 @@ In addition, if <tt>EnableClientScript</tt> is true, validation will also be per
<dl>
<dt>ControlToValidate</dt>
<dd>The <tt>ID</tt> of the component for this validator. This property must be set to the <tt>ID</tt> path of an input component. The <tt>ID</tt> path is the dot-connected IDs of the components reaching from the validator's parent component to the target component. </dd>
-
+
<dt>ErrorMessage</dt>
<dd>The text for the error message when the input component failed to validate.</dd>
@@ -21,14 +21,14 @@ In addition, if <tt>EnableClientScript</tt> is true, validation will also be per
</dd>
<dt>Display</dt>
- <dd>The display behavior of the error message in a validation component. The allowed values are: <tt>None</tt>, <tt>Static</tt> and <tt>Dynamic</tt>. The default is <tt>Static</tt>.
+ <dd>The display behavior of the error message in a validation component. The allowed values are: <tt>None</tt>, <tt>Static</tt> and <tt>Dynamic</tt>. The default is <tt>Static</tt>.
<ul>
<li><tt>None</tt> -- the validator component and the error message will not be displayed. </li>
<li><tt>Dynamic</tt> -- CSS for the error is constructed in such a way that space for the error message on the page is NOT reserved. When the user hits the "submit" button, applicable error messages will show up shifting the layout of your page around (usually down). </li>
<li><tt>Static</tt> -- CSS for the error is constructed in such a way that space for the error message on the page is always reserved. When the user hits the "submit" button, applicable error messages will just show up, not altering the layout of your page. </li>
</ul>
</dd>
-
+
<dt>EnableClientScript</dt>
<dd>Indicating whether client-side validation is enabled. Default is true.</dd>
</dl>
@@ -53,7 +53,6 @@ This is the simplest validator, ensuring that the input field has some sort of v
<dd>The regular expression that determines the pattern used to validate a field. Some commonly used regular expressions include:
<ul>
<li>At least 6 characters: <code>[\w]{6,}</code></li>
- <li>Internal URL: <code>http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)? </code></li>
<li>Japanese Phone Number: <code>(0\d{1,4}-|\(0\d{1,4}\) ?)?\d{1,4}-\d{4}</code></li>
<li>Japanese Postal Code: <code>\d{3}(-(\d{4}|\d{2}))?</code></li>
<li>P.R.C. Phone Number: <code>(\(\d{3}\)|\d{3}-)?\d{8} </code></li>
@@ -63,15 +62,21 @@ This is the simplest validator, ensuring that the input field has some sort of v
<li>U.S. ZIP Code: <code>\d{5}(-\d{4})?</code></li>
<li>U.S. Social Security Number: <code>\d{3}-\d{2}-\d{4}</code></li>
</ul>
- More regular expression patterns can be found on the Internet, e.g.
+ More regular expression patterns can be found on the Internet, e.g.
<a href="http://regexlib.com/">http://regexlib.com/</a>.
</dd>
</dl>
+<p>
+Note, if the value being validated is empty, TRegularExpressionValidator will not do validation. Use a TRequiredFieldValidator to ensure the value is not empty.
+</p>
<com:RunBar PagePath="Controls.Samples.TRegularExpressionValidator.Home" />
<h2>TEmailAddressValidator</h2>
-<p><tt>TEmailAddressValidator</tt> validates whether the value of an associated input component is a valid email address. It will check MX record if <tt>checkdnsrr()</tt> is available in the installed PHP.
+<p><tt>TEmailAddressValidator</tt> validates whether the value of an associated input component is a valid email address. If <tt>CheckMXRecord</tt> is true, besides checking the format of the input value, the validator will also check MX record for the email address, provided <tt>checkdnsrr()</tt> is available in the installed PHP.
+</p>
+<p>
+Note, if the value being validated is empty, TEmailAddressValidator will not do validation. Use a TRequiredFieldValidator to ensure the value is not empty.
</p>
<com:RunBar PagePath="Controls.Samples.TEmailAddressValidator.Home" />
@@ -81,10 +86,10 @@ This is the simplest validator, ensuring that the input field has some sort of v
<dl>
<dt>ControlToCompare</dt>
<dd>The input component to compare with the input control being validated. </dd>
-
+
<dt>ValueToCompare</dt>
<dd>A constant value to compare with the value entered by the user into the input component being validated. </dd>
-
+
<dt>ValueType</dt>
<dd>The data type (<tt>Integer</tt>, <tt>Double</tt>, <tt>Currency</tt>, <tt>Date</tt>, <tt>String</tt>) that the values being compared are converted to before the comparison is made. </dd>
@@ -104,12 +109,12 @@ This is the simplest validator, ensuring that the input field has some sort of v
<dt>Integer</dt>
<dd>A 32-bit signed integer data type. </dd>
- <dt>Double</dt>
+ <dt>Float</dt>
<dd>A double-precision floating point number data type. </dd>
-
+
<dt>Currency</dt>
<dd>A decimal data type that can contain currency symbols. </dd>
-
+
<dt>Date</dt>
<dd>A date data type, the date format depends on the <tt>DateFormat</tt> property.</dd>
@@ -120,16 +125,24 @@ This is the simplest validator, ensuring that the input field has some sort of v
<p>Use the <tt>Operator</tt> property to specify the type of comparison to perform. If you set the <tt>Operator</tt> property to <tt>DataTypeCheck</tt>, the <tt>TCompareValidator</tt> component will ignore the <tt>ControlToCompare</tt> and <tt>ValueToCompare</tt> properties and simply indicates whether the value entered into the input component can be converted to the data type specified by the <tt>ValueType</tt> property. </p>
<p>Note that if the input control is empty, no validation functions are called and validation succeeds. Use a <tt>RequiredFieldValidator</tt> control to require the user to enter data into the input control. </p>
+<com:RunBar PagePath="Controls.Samples.TCompareValidator.Home" />
+<h2>TRangeValidator</h2>
+<p>
+</p>
+<com:RunBar PagePath="Controls.Samples.TRangeValidator.Home" />
-
-<com:RunBar PagePath="Controls.Samples.TCompareValidator.Home" />
+<h2>TValueTypeValidator</h2>
+<p>
+</p>
+<com:RunBar PagePath="Controls.Samples.TValueTypeValidator.Home" />
<h2>TCustomValidator</h2>
<p>
</p>
<com:RunBar PagePath="Controls.Samples.TCustomValidator.Home" />
+
<h2>TValidationSummary</h2>
<p>
</p>