MvcValidatorToolkit/Validators/ValidateScriptMethod.cs
/// <summary>
/// Gets a ValidatorMethodData instance that defines the client-side validator used by the
/// jQuery validation plugin.
/// </summary>
Gets a ValidatorMethodData instance that defines the client-side validator used by the
jQuery validation plugin.
Gets a ValidatorMethodData instance that defines the client - side validator used by the jQuery validation plugin .
public override ValidatorMethodData GetClientMethodData()
		{
			if(string.IsNullOrEmpty(MethodName))
				throw new Exception("MethodName must be defined for script method validator");
			return new ValidatorMethodData(
				"scriptMethod" + TypeCount,
				"function(value,element,parameters){return " + MethodName + "(value,element,parameters);}",
				"$.format('" + ErrorMessageFormat + "')"
			);
		}
public override ValidatorMethodData GetClientMethodData ( ) { if ( string . IsNullOrEmpty ( MethodName ) ) throw new Exception ( " " ) ; return new ValidatorMethodData ( " " + TypeCount , " " + MethodName + " " , " " + ErrorMessageFormat + " " ) ; }
Gets a ValidatorMethodData instance that defines the client-side validator used by the
jQuery validation plugin.
Gets a ValidatorMethodData instance that defines the client - side validator used by the jQuery validation plugin .