Home

Castle Stronghold

ValidationHelper API Document

Helper that provides client-side validation.

Quick Note

The javascript core lib is extension of Peter Bailey's fValidate(http://www.peterbailey.net/fValidate/).

Constructors

ValidationHelper()

Constructor.

Properties

NameTypeDescription
VirtualDirString Gets or Sets the Virtual Directory the scripts are in.
ExtensionString

Methods

BuildScriptInclude(String baseDir, String js, String extension) : String

Missing summary

ParameterDescription
baseDir Missing documentation
js Missing documentation
extension Missing documentation

SetSubmitOptions(IDictionary parameters)

Configure the submit and validation options.

ParameterDescription
parameters Missing documentation

SetSubmitOptions(Boolean confirm, Boolean disable, Boolean groupError, Int32 errorMode)

Configure the submit and validation options.

ParameterDescription
confirmTrue for submit confirmation. Otherwise, false.
disableTrue for submit buttons disabling.
groupErrorTrue for error grouping.
errorModeSystem.Int32 representing the error mode.

InstallScripts() : String

Automatic Script installer.

InstallWithCustomMsg(String scriptFilePath) : String

Install the script with a custom message file(based on the fValidate I18N file).

ParameterDescription
scriptFilePath A System.String represeting the path and file name

InstallScripts(String baseDir) : String

Manual Script Installer.

Quick Note

You'll need to have the files physically

ParameterDescription
baseDir The virtual path of the dir where the fValidate are.

InstallScripts(String baseDir, String lang) : String

Manual Script Installer.

Quick Note

You'll need to have the files physically

ParameterDescription
baseDir The virtual path of the dir where the fValidate are.
lang The language of the messages.

GetValidationTriggerFunction() : String

Returns the form validation function.

GetValidationTriggerFunction(String formElement) : String

Returns the form validation function.

ParameterDescription
formElement Javascript expression that return the desired form.

GetValidationTriggerFunction(String formElement, IDictionary options) : String

Returns the form validation function where you can override the options:

Quick Note

The options that can be overriden: confirm (bool), disable (bool), groupError (bool), errorMode (int)

ParameterDescription
formElement Javascript expression that return the desired form.
options Custom options

Google
Search WWW Search castleproject.org