MvcValidatorToolkit/Validators/ValidatePattern.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()
		{
			string scriptPattern = ScriptPattern;
			if(string.IsNullOrEmpty(scriptPattern))
				scriptPattern = this.Pattern;
			return new ValidatorMethodData(
				"pattern" + TypeCount,
				"function(value,element,parameters){var re = new RegExp(/" + scriptPattern + "/); return value.match(re);}",
				"$.format('" + ErrorMessageFormat + "')"
			);
		}
public override ValidatorMethodData GetClientMethodData ( ) { string scriptPattern = ScriptPattern ; if ( string . IsNullOrEmpty ( scriptPattern ) ) scriptPattern = this . Pattern ; return new ValidatorMethodData ( " " + TypeCount , " " + scriptPattern + " " , " " + 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 .