JavaScript DHTML/SmartClient/Form Validation

Материал из Web эксперт
Версия от 07:27, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Bounded Length Range Validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"boundedLengthRange", 
       title:"lengthRange 4-8",
       validators:[
          {
             type:"lengthRange", 
             errorMessage:"Value must be 4-8 characters long.", 
             min:4, 
             max:8
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        boundedLengthRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Conditional required field

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="silver">
<SCRIPT>
isc.DynamicForm.create({
    ID: "exampleForm",
    width: 250,
    titleOrientation: "top",
    fields: [
        {name: "willAttend",
         type: "radioGroup",
         colSpan: "*",
         required: true,
         vertical: false,
         valueMap: ["Yes", "No"],
         redrawOnChange:true,
         title: "Will you be attending the meeting on April 4th? If no, please provide a reason"
        },
        {name: "reason",
         type: "text",
         title: "Reason",
         validators : [{
            type: "requiredIf",
            expression: "exampleForm.getValue("willAttend") == "No"",
            errorMessage: "Please provide a reason"
         }]
        },
        {name: "validate",
         title: "Validate",
         type: "button",
         click: "form.validate()"
        }
    ]
});

</SCRIPT>
</BODY>
</HTML>



Confirmation based field validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"custom", 
       title:"custom - confirm dialog",
       validators:[
          {
             condition:"confirm("Accept the value \""+value+"\" for custom field?")",
             errorMessage:"Custom Field Value Rejected", clientOnly:true
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        custom:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Integer field

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"isInteger", 
       title:"isInteger",
       validators:[
          {
             type:"isInteger", 
             errorMessage:"Value must be an integer."
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        isInteger:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Integer value range field

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"boundedIntegerRange", 
       type:"integer", 
       title:"integerRange 10-100",
       validators:[
          {
             type:"integerRange", 
             errorMessage:"Value must be between 10 and 100.", 
             min:10, 
             max:100
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        boundedIntegerRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Lower Bounded Integer Range

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"lowerBoundedIntegerRange", 
       type:"integer", 
       title:"integerRange 10-",
       validators:[
          {
             type:"integerRange", 
             errorMessage:"Value must be >= 10.", 
             min:10
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        lowerBoundedIntegerRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Lower Bounded Length Range Validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"lowerBoundedLengthRange", 
       title:"lengthRange 4-",
       validators:[
          {
             type:"lengthRange", 
             errorMessage:"Value must be 4 or more characters long.", 
             min:4
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        lowerBoundedLengthRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Mark field as required

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"required", 
       title:"required", 
       required:true
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        custom:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Must be a boolean value

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"isBoolean", 
       title:"isBoolean",
       validators:[
          {
             type:"isBoolean", 
             errorMessage:"Value must be boolean."
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        isBoolean:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Must match field validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"upperBoundedLengthRange", 
       title:"lengthRange -8",
       validators:[
          {
             type:"lengthRange", 
             errorMessage:"Value must be 8 or fewer characters long.", 
             max:8
          }
       ]
    },
    {
       name:"matchesField", 
       title:"matchesField - field 1",
       validators:[
          {
             type:"matchesField", 
             errorMessage:"Value must match value of first field.", 
             otherField:"required"
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        matchesField:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Regexp validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"regexp", 
       title:"regexp zipcode format",
       validators:[
          {
             type:"regexp", 
             errorMessage:"Value must be in zipcode format.", 
             expression:/^\d{5}(-\d{4}){0,1}$/
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        contains:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Required field and hint

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR="papayawhip" MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=5 BORDER=0><TR><TD CLASS=pageHeader BGCOLOR=WHITE>
  Form item annotations example
</TD><TD CLASS=pageHeader ALIGN=RIGHT BGCOLOR=WHITE>
  Isomorphic SmartClient
</TD></TR></TABLE><TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD BGCOLOR=336666><IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4></TD></TR></TABLE>

<!--------------------------
  Example code starts here
---------------------------->
<SCRIPT>
var formItems = [
       {
          type:"header", 
          defaultValue:"Item title and hint"
       },
       {
          type:"rowSpacer"
       },
       {
          name:"titleHint", 
          title:"title text", 
          hint:"hint text"
       },
       {
          type:"rowSpacer"
       },
       {
          type:"header", 
          defaultValue:"Item title and hint (required field)"
       },
       {
          type:"rowSpacer"
       },
       {
          name:"titleHintReq", 
          title:"title text", 
          hint:"hint text", 
          required:true
       },
       {
          type:"rowSpacer"
       },
       {
          type:"header", 
          defaultValue:"Item title, hint, and error"
       },
       {
          type:"rowSpacer"
       },
       {
          name:"titleHintError", 
          title:"title text", 
          hint:"hint text"
       },
       {
          type:"rowSpacer"
       },
       {
          type:"rowSpacer"
       },
       {
          type:"header", 
          defaultValue:"Item title and hint example (required field)"
       },
       {
          type:"rowSpacer"
       },
       {
          name:"titleHintExample", 
          title:"Password", 
          type:"password", 
          hint:"4-12 alphanumeric characters", 
          required:true
       },
       {
          type:"rowSpacer"
       },
    
       {
          type:"header", 
          defaultValue:"Item title, hint, and error example (required field)"
       },
       { 
          type:"rowSpacer"
       },
       {
          name:"titleHintErrorExample", 
          title:"Password", type:"password", 
          hint:"4-12 alphanumeric characters", 
          required:true
       }
    ],
    formValues = {
        titleHint:"value",
        titleHintReq:"value",
        titleHintError:"value",
        titleHintExample:"xxx",
        titleHintErrorExample:"xxx"
    },
    
    formErrors = {
        titleHintError:"error text",
        titleHintErrorExample:"Your password must be at least 4 characters long."
    };
    
DynamicForm.create({
    ID:"dynform",
    left:20,
    top:45,
    width:600,
    items:formItems,
    values:formValues,
    errors:formErrors
});
</SCRIPT>
</BODY>
</HTML>



Substring Count Validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"substringCount", 
       title:"substringCount "." == 3",
       validators:[
          {
             type:"substringCount", 
             errorMessage:"Value must contain exactly three dots.", 
             substring:".",
             operator:"==", count:3
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        contains:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Upper Bounded Integer Range

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"upperBoundedIntegerRange", 
       type:"integer", 
       title:"integerRange -100",
       validators:[
          {
             type:"integerRange", 
             errorMessage:"Value must be <= 100.", 
             max:100
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        upperBoundedIntegerRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Upper Bounded Length Range Validation

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"upperBoundedLengthRange", 
       title:"lengthRange -8",
       validators:[
          {
             type:"lengthRange", 
             errorMessage:"Value must be 8 or fewer characters long.", 
             max:8
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        upperBoundedLengthRange:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Validation type: requiredIf

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"requiredIf", 
       title:"requiredIf - true",
       validators:[
          {
              type:"requiredIf", 
              errorMessage:"Value must be non-empty.", 
              expression:"true"
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        requiredIf:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Value must be one of

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"isOneOf", 
       title:"isOneOf ["a","b","c"]",
       validators:[
          {
             type:"isOneOf", 
             errorMessage:"Value must be one of ["a","b","c"].", 
             list:["a","b","c"]
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        isOneOf:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Value must contain the substring

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"contains", 
       title:"contains "abc"",
       validators:[
          {
             type:"contains", 
             errorMessage:"Value must contain the substring "abc".", 
             substring:"abc"
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        contains:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>



Value must not contain any spaces

 
<!--
Isomorphic SmartClient
Copyright(c) 1998 and beyond Isomorphic Software, Inc.
"SmartClient" is a trademark of Isomorphic Software, Inc.
All rights reserved.
Open Source License
SmartClient source code, located under the source/ directory, and the resulting assembled modules 
in isomorphic/system/modules/, as well as JavaScript and CSS files under the isomorphic/skins directory are 
licensed under the terms of the GNU Lesser General Public License, version 3. 
The text of the LGPLv3 license is available online at http://www.gnu.org/licenses/lgpl-3.0.html
If your project precludes the use of this license, or if you"d like to support SmartClient LGPL, 
we encourage you to buy a commercial license.
Icon Experience Collection
Selected 16x16 icons within the isomorphic/skins directory are part of the Icon Experience collection 
(http://www.iconexperience.ru) and may be freely used with any SmartClient components without charge, 
but may not be used as part of screen designs separate from SmartClient components without a purchase 
of a license from Icon Experience. We are working to replace these icons as soon as possible.
All other media found under the isomorphic/skins directory may be used under the LGPLv3.
Commercial Licenses
A number of commercial licenses are available for purchase. Please see http://smartclient.ru/license.
Warranty Disclaimer
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 
Public License for more details.
Copyright 2001 and beyond Isomorphic Software, Inc. Last revised July 20, 2008. 

-->
<!-- The following code is revised from SmartClient demo code(SmartClient_70rc2_LGPL.zip).-->

<HTML><HEAD>
  <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
  <SCRIPT SRC=isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY>
<SCRIPT>
var formItems = [
    {
       name:"doesntContain", 
       title:"doesntContain " "",
       validators:[
          {
             type:"doesntContain", 
             errorMessage:"Value must not contain any spaces.", 
             substring:" "
          }
       ]
    },
    {
       type:"rowSpacer"},
    // Submit button for form - will perform automatic client side validation before submission
    // Note: we would have to set canSubmit to true on the DymamicForm to allow form submission.
    // {title:"Submit Form", type:"submit", align:"center"}
    // Button to call validation demonstration function
    {title:"Validate Form", type:"button", click:"validateForm()", align:"center"}
    ],

    formValues = {
        contains:"x",
    };
DynamicForm.create({
    ID:"simpleForm",
    left:20,
    top:40,
    items:formItems,
    values:formValues,
    width:600,
    titleWidth:200
});

//    A function to demonstrate form validation, and alert on success
//    Note: Validation is performed automatically on form submission -
//    no explicit call to the form.validate() function usually required.
function validateForm(){
    if(simpleForm.validate()){
    alert ("Form validation was successful!");
    simpleForm.redraw();
    };
};
</SCRIPT>
</BODY>
</HTML>