Client Scripts

By

November 27, 2008

Javascript Validation Scripts

OWS supports comprehensive validation utilities in simple way. All it requires is a SPAN Tag having attributes as listed.

  • id - An unique identifier for SPAN
  • controltovalidate - Control ID that is required validation
  • errormessage - Error message to display for validation fails
  • display - Kind of display either Dynamic or None
  • evaluationfunction - Name the type of validation to perform. OWS supports the following validation types
    • CompareValidatorEvaluateIsValid
    • CustomValidatorEvaluateIsValid
    • RegularExpressionValidatorEvaluateIsValid
    • RequiredFieldValidatorEvaluateIsValid
    • RangeValidatorEvaluateIsValid
  • style - Style of text to display like color, display style, font
  • type - Datatype of input value. Refer below for list of datatypes
  • initialvalue - Tells what is the initial value set to control. Then validator bypasses control initial value.
  • minimumvalue - Requires in Range Validation to set minimum value for range
  • maximumvalue - Requires in Range Validation to set maximum value for range
  • validationexpression - Requires in RegularExpression Validation to validate the structure (mask) of input

 

Datatypes

The available data types for OWS validations are:

  • Integer
  • Double
  • Currency
  • Date

Other than above type is converted to String. So be specific to mention TYPE in SPAN for every validation.

 

E.g:                                 <span id="vTextValid" 
                                            controltovalidate="text1" 
                                            errormessage="" 
                                            display="Dynamic"
                                            type="Integer"
                                            evaluationfunction="RangeValidatorEvaluateIsValid" 
                                            minimumvalue = "0"  maximumvalue = "15" 
                                            style="display: none; color: red;">
Average (0 Ratings):
 
Want to help out?
 
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share