C# Class Castle.MonoRail.Framework.Helpers.ValidationHelper

Helper that provides client-side validation.
The javascript core lib is extension of Peter Bailey's fValidate(http://www.peterbailey.net/fValidate/).
Inheritance: AbstractHelper
Mostrar archivo Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
GetValidationTriggerFunction ( ) : String

Returns the form validation function.

GetValidationTriggerFunction ( String formElement ) : String

Returns the form validation function.

GetValidationTriggerFunction ( String formElement, IDictionary options ) : String

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

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

InstallScripts ( ) : String

Automatic Script installer.

InstallScripts ( string locale ) : string

Installs the scripts.

SetSubmitOptions ( IDictionary parameters ) : void

Configure the submit and validation options.

SetSubmitOptions ( bool confirm, bool disable, bool groupError, int errorMode ) : void

Configure the submit and validation options.

ValidationHelper ( ) : System

Constructor.

Method Details

GetValidationTriggerFunction() public method

Returns the form validation function.
public GetValidationTriggerFunction ( ) : String
return String

GetValidationTriggerFunction() public method

Returns the form validation function.
public GetValidationTriggerFunction ( String formElement ) : String
formElement String Javascript expression that return the desired form.
return String

GetValidationTriggerFunction() public method

Returns the form validation function where you can override the options:
The options that can be overriden: confirm (bool), disable (bool), groupError (bool), errorMode (int)
public GetValidationTriggerFunction ( String formElement, IDictionary options ) : String
formElement String Javascript expression that return the desired form.
options IDictionary Custom options
return String

InstallScripts() public method

Automatic Script installer.
public InstallScripts ( ) : String
return String

InstallScripts() public method

Installs the scripts.
public InstallScripts ( string locale ) : string
locale string The locale.
return string

SetSubmitOptions() public method

Configure the submit and validation options.
public SetSubmitOptions ( IDictionary parameters ) : void
parameters IDictionary
return void

SetSubmitOptions() public method

Configure the submit and validation options.
public SetSubmitOptions ( bool confirm, bool disable, bool groupError, int errorMode ) : void
confirm bool True for submit confirmation. Otherwise, false.
disable bool True for submit buttons disabling.
groupError bool True for error grouping.
errorMode int representing the error mode.
return void

ValidationHelper() public method

Constructor.
public ValidationHelper ( ) : System
return System