Validanguage API Reference

Namespace validanguage.settings

validanguage.settings object
Defined in: validanguage_uncompressed.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
validanguage.settings.ajaxTimeout
How long are ajax requests allowed to run before they are timed out? Especially useful for ajax requests used as part of a form submission.
<static>  
validanguage.settings.cacheAjaxLookups
Should ajax lookups be cached? If set to true, any ajax calls for the same value on the same form field will use the cached results from the earlier lookup.
<static>  
validanguage.settings.callToggleTransformationsOnload
Should any validanguage.toggle() transformations which are defined for form fields on the page be automatically called when the page has finished loading.
<static>  
validanguage.settings.characterValidationErrorMsg
Default error message for the validateCharacters function
<static>  
validanguage.settings.commentDelimiter
Determines the delimeter used in the loadCommentAPI() function to split up each comment into multiple validanguage tags.
<static>  
validanguage.settings.defaultTransformationHandlers
If a transformation is supplied without any event handlers, how should it be treated in loadElAPI()?
<static>  
validanguage.settings.defaultValidationHandlers
If a validation is supplied without any event handlers, how should it be treated in loadElAPI()? This setting also affects the behavior of the required=true and maxlength/minlength shortcuts.
<static>  
validanguage.settings.emptyOptionElements
This array is used in the validateRequired function to determine whether a select box has been left on the default, "empty" option.
<static>  
validanguage.settings.errorDivId
Specifies the ID to be assigned to the DIV used for the showFailedFields option in showError().
<static>  
validanguage.settings.errorListId
Specifies the ID to be assigned to the UL used for the showFailedFields option in showError().
<static>  
validanguage.settings.errorListItemSuffix
Used to make the ID used for the showFailedFields option in showError().
<static>  
validanguage.settings.errorListText
The text specified in errorListText will be placed at the top of the errorDiv generated by the showFailedFields option in showError().
<static>  
validanguage.settings.errorMsg
Default generic error message
<static>  
validanguage.settings.errorMsgSpanSuffix
Used to make the ID used in hideError() to assign to the SPAN element inside the vdError DIV.
<static>  
validanguage.settings.errorOnMatch
Defines the default behavior of the validateRegex function.
<static>  
validanguage.settings.failedFieldClassName
Class name used in showError() to assign to a form field which fails validation
<static>  
validanguage.settings.focusOnerror
Should the target element of a failed validation receive focus when a validation fails? IMPORTANT note regarding showAlert and focusOnError.
<static>  
validanguage.settings.loadCommentAPI
Should the HTML document be scanned for validanguage comment tags? Set this to false if you arent using the comment API for better performance.
<static>  
validanguage.settings.maxlengthErrorMsg
Default error message for the validateMaxlength validation
<static>  
validanguage.settings.minlengthErrorMsg
Default error message for the validateMinlength validation
<static>  
validanguage.settings.noErrorClassName
Class name used in hideError() to assign to a DIV which was created to show an inline error msgs which is then removed.
<static>  
validanguage.settings.normalTextboxColor
Normal color of the textbox.
<static>  
validanguage.settings.onerror
Override this to set a global error handler for all validation results If you want to use only alert messages via showAlert, set this to {} to turn off inline error msgs
<static>  
validanguage.settings.onErrorClassName
Class name used in showError() to assign to the DIVs which are created to show the inline error msgs.
<static>  
validanguage.settings.onsuccess
Override this to set a global success handlers for all validation results If you want to use only alert messages via showAlert, set this to {} to turn off inline error msgs
<static>  
validanguage.settings.passedFieldClassName
Class name used in hideError() to assign to a form field which passes validation
<static>  
validanguage.settings.requiredErrorMsg
Default error message for the validateRequired validation
<static>  
validanguage.settings.retriggerErrors
If a field has already failed validation and it fails again, should the new failure trigger the onerror handlers? Set this to false to prevent a given field's onkeydown validation from retriggering with every keystroke.
<static>  
validanguage.settings.showAlert
Should an alert() be shown when a validation fails? By default, validanguage.showError() and validanguage.hideError() instead place the error msg underneath the failed field.
<static>  
validanguage.settings.showFailedFields
To display a combined list of all fields which failed validation in addition to the inline error msgs, set showFailedFields to true.
<static>  
validanguage.settings.showSubmitMessageId
Determines the ID of the DIV created in the showSubmitMessage() function used to replace a form's submit button once the form has been submitted.
<static>  
validanguage.settings.showSubmitMessageMessage
Determines the text used by the showSubmitMessage() function which is used replace a form's submit button once the form has been submitted.
<static>  
validanguage.settings.submitFormOnExpiredAjax
When an ajax request is sent as part of a form submit validation routine and it times out, should the form submit by default? This defaults to true to help guard against programming errors blocking users from being able to submit a form due to a broken ajax validation.
<static>  
validanguage.settings.timeDelay
Amount of time the text box flashes the validationErrorColor.
<static>  
validanguage.settings.toggleVisibilityDefaultsToHidden
Should the toggle visibility API in validanguage.toggle() default to "hidden" if a given target does not satisfy any provided "visible" conditions? If you set this to false, you will need to explicitly provide the desired "hidden" conditions.
<static>  
validanguage.settings.typingDelay
Typing delay for the ontyping event.
<static>  
validanguage.settings.validateAllFieldsOnsubmit
When a form is submitted, are all form fields validated, or do we stop once one fails?
<static>  
validanguage.settings.validateRequiredAlternativesOnclick
Should the validateRequiredAlternatives function be assigned onclick to radio buttons and checkboxes named as "requiredAlternatives"? Setting this to true ensures that checking/unchecking a radio button or checkbox will correctly call showError/hideError.
<static>  
validanguage.settings.validationErrorColor
Color for the textbox to flash when invalid input is entered.
Method Summary
Method Attributes Method Name and Description
<static>  
validanguage.settings.onload()
Override this to setup a function to run after all validanguage form fields have been intialized inside the populate() function.
Namespace Detail
validanguage.settings
Field Detail
<static> validanguage.settings.ajaxTimeout
How long are ajax requests allowed to run before they are timed out? Especially useful for ajax requests used as part of a form submission.
Default Value:
30

<static> validanguage.settings.cacheAjaxLookups
Should ajax lookups be cached? If set to true, any ajax calls for the same value on the same form field will use the cached results from the earlier lookup.
Default Value:
true

<static> validanguage.settings.callToggleTransformationsOnload
Should any validanguage.toggle() transformations which are defined for form fields on the page be automatically called when the page has finished loading.
Default Value:
true

<static> validanguage.settings.characterValidationErrorMsg
Default error message for the validateCharacters function
Default Value:
'You have entered invalid characters'

<static> validanguage.settings.commentDelimiter
Determines the delimeter used in the loadCommentAPI() function to split up each comment into multiple validanguage tags. You probably want to keep this as "\n" to be safe, but if you want to be allowed to use carriage returns inside validanguage comment tags, you can set this to "/>" if you are careful to always close your validanguage tags
Default Value:
"\n"

<static> validanguage.settings.defaultTransformationHandlers
If a transformation is supplied without any event handlers, how should it be treated in loadElAPI()?
Default Value:
['blur']

<static> validanguage.settings.defaultValidationHandlers
If a validation is supplied without any event handlers, how should it be treated in loadElAPI()? This setting also affects the behavior of the required=true and maxlength/minlength shortcuts.
Default Value:
['submit']

<static> validanguage.settings.emptyOptionElements
This array is used in the validateRequired function to determine whether a select box has been left on the default, "empty" option. Add/Remove from this array as needed.
Default Value:
[' ','0',' ','']

<static> validanguage.settings.errorDivId
Specifies the ID to be assigned to the DIV used for the showFailedFields option in showError(). If a DIV with this ID exists in the DOM, it will be used. If it doesn't exist, one will be created dynamically.
Default Value:
'vdErrorDiv'

<static> validanguage.settings.errorListId
Specifies the ID to be assigned to the UL used for the showFailedFields option in showError().
Default Value:
'vdErrorList'

<static> validanguage.settings.errorListItemSuffix
Used to make the ID used for the showFailedFields option in showError(). The errorListItemSuffix is appended to the end of the form field's ID to make the ID for the LI item.
Default Value:
'_vd_li'

<static> validanguage.settings.errorListText
The text specified in errorListText will be placed at the top of the errorDiv generated by the showFailedFields option in showError().
Default Value:
'Please correct the following fields:'

<static> validanguage.settings.errorMsg
Default generic error message
Default Value:
'You have entered an invalid entry in the form'

<static> validanguage.settings.errorMsgSpanSuffix
Used to make the ID used in hideError() to assign to the SPAN element inside the vdError DIV. The errorMsgSpanSuffix is appended to the end of the form field's ID to make the SPAN ID. If a SPAN with this ID already exists in the DOM, it will be used. If it doesn't exist, one will be created dynamically.
Default Value:
'_errorMsg'

<static> validanguage.settings.errorOnMatch
Defines the default behavior of the validateRegex function. Is a match against the regex an error or a success?
Default Value:
false

<static> validanguage.settings.failedFieldClassName
Class name used in showError() to assign to a form field which fails validation
Default Value:
'failedField'

<static> validanguage.settings.focusOnerror
Should the target element of a failed validation receive focus when a validation fails? IMPORTANT note regarding showAlert and focusOnError. Do NOT set both of these to true if using onblur validations. Pick either one or the other. When you use both, it is possible to create infinite loops in which a validation failure generates an alert, triggering an onblur, which triggers another validation failure and subsequent alert. If you aren't using onblur validations at all, you can safely use both.
Default Value:
false

<static> validanguage.settings.loadCommentAPI
Should the HTML document be scanned for validanguage comment tags? Set this to false if you arent using the comment API for better performance.
Default Value:
true

<static> validanguage.settings.maxlengthErrorMsg
Default error message for the validateMaxlength validation
Default Value:
'The indicated field may not be longer than {!maxlength} characters'

<static> validanguage.settings.minlengthErrorMsg
Default error message for the validateMinlength validation
Default Value:
'The indicated field must be at least {!minlength} characters long'

<static> validanguage.settings.noErrorClassName
Class name used in hideError() to assign to a DIV which was created to show an inline error msgs which is then removed.
Default Value:
'vdNoError'

<static> validanguage.settings.normalTextboxColor
Normal color of the textbox. The default is empty. Used in conjunction with validationErrorColor to make the textboxes flash.
Default Value:
''

<static> validanguage.settings.onerror
Override this to set a global error handler for all validation results If you want to use only alert messages via showAlert, set this to {} to turn off inline error msgs
Default Value:
'validanguage.showError'

<static> validanguage.settings.onErrorClassName
Class name used in showError() to assign to the DIVs which are created to show the inline error msgs.
Default Value:
'vdError'

<static> validanguage.settings.onsuccess
Override this to set a global success handlers for all validation results If you want to use only alert messages via showAlert, set this to {} to turn off inline error msgs
Default Value:
'validanguage.hideError'

<static> validanguage.settings.passedFieldClassName
Class name used in hideError() to assign to a form field which passes validation
Default Value:
'passedField'

<static> validanguage.settings.requiredErrorMsg
Default error message for the validateRequired validation
Default Value:
'You have skipped a required field'

<static> validanguage.settings.retriggerErrors
If a field has already failed validation and it fails again, should the new failure trigger the onerror handlers? Set this to false to prevent a given field's onkeydown validation from retriggering with every keystroke. If retriggerErrors is set to false and a different validation function fails, ie, the error message should change from one error to another, the error WILL be triggered.
Default Value:
true

<static> validanguage.settings.showAlert
Should an alert() be shown when a validation fails? By default, validanguage.showError() and validanguage.hideError() instead place the error msg underneath the failed field.
Default Value:
false

<static> validanguage.settings.showFailedFields
To display a combined list of all fields which failed validation in addition to the inline error msgs, set showFailedFields to true. The fields will be listed using the "field" attribute (or ID if field is not available).
Default Value:
false

<static> validanguage.settings.showSubmitMessageId
Determines the ID of the DIV created in the showSubmitMessage() function used to replace a form's submit button once the form has been submitted.
Default Value:
'vdSubmitMessage'

<static> validanguage.settings.showSubmitMessageMessage
Determines the text used by the showSubmitMessage() function which is used replace a form's submit button once the form has been submitted. If desired, you can include HTML or IMG tags instead of the default text.
Default Value:
'Loading'

<static> validanguage.settings.submitFormOnExpiredAjax
When an ajax request is sent as part of a form submit validation routine and it times out, should the form submit by default? This defaults to true to help guard against programming errors blocking users from being able to submit a form due to a broken ajax validation.
Default Value:
true

<static> validanguage.settings.timeDelay
Amount of time the text box flashes the validationErrorColor. The default is 100ms
Default Value:
100

<static> validanguage.settings.toggleVisibilityDefaultsToHidden
Should the toggle visibility API in validanguage.toggle() default to "hidden" if a given target does not satisfy any provided "visible" conditions? If you set this to false, you will need to explicitly provide the desired "hidden" conditions.
Default Value:
true

<static> validanguage.settings.typingDelay
Typing delay for the ontyping event. This is the amount of time between keystrokes that must elapse before the event fires. The default is just over 1 second.
Default Value:
1100

<static> validanguage.settings.validateAllFieldsOnsubmit
When a form is submitted, are all form fields validated, or do we stop once one fails?
Default Value:
true

<static> validanguage.settings.validateRequiredAlternativesOnclick
Should the validateRequiredAlternatives function be assigned onclick to radio buttons and checkboxes named as "requiredAlternatives"? Setting this to true ensures that checking/unchecking a radio button or checkbox will correctly call showError/hideError.
Default Value:
true

<static> validanguage.settings.validationErrorColor
Color for the textbox to flash when invalid input is entered. The default is light red. Set this to empty to turn flashing off.
Default Value:
'#FF6666'
Method Detail
<static> validanguage.settings.onload()
Override this to setup a function to run after all validanguage form fields have been intialized inside the populate() function. The default is an empty function.

Documentation generated by JsDoc Toolkit 2.0.2 on Sat Jul 30 2011 09:26:32 GMT-0400 (EDT)