MvcValidatorToolkit/Validator.cs
/// <summary>
/// Initializes the current validator object with the specified validation set and
/// type count.
/// </summary>
Initializes the current validator object with the specified validation set and
type count.
Initializes the current validator object with the specified validation set and type count .
public void Initialize(ValidationSet validationSet, int typeCount)
		{
			if(validationSet == null)
				throw new ArgumentNullException("validationSet");
			if(typeCount < 0)
				throw new ArgumentNullException("typeCount");
			ValidationSet = validationSet;
			TypeCount = typeCount;
			if(string.IsNullOrEmpty(ErrorMessageFormat))
				ErrorMessageFormat = ValidationSet.GetLocalizedText(GetType().Name + "_DefaultErrorMessage");
			if(string.IsNullOrEmpty(ErrorMessageFormat))
				ErrorMessageFormat = GetDefaultErrorMessageFormat();
		}
public void Initialize ( ValidationSet validationSet , int typeCount ) { if ( validationSet == null ) throw new ArgumentNullException ( " " ) ; if ( typeCount < 0 ) throw new ArgumentNullException ( " " ) ; ValidationSet = validationSet ; TypeCount = typeCount ; if ( string . IsNullOrEmpty ( ErrorMessageFormat ) ) ErrorMessageFormat = ValidationSet . GetLocalizedText ( GetType ( ) . Name + " " ) ; if ( string . IsNullOrEmpty ( ErrorMessageFormat ) ) ErrorMessageFormat = GetDefaultErrorMessageFormat ( ) ; }
Initializes the current validator object with the specified validation set and
type count.
Initializes the current validator object with the specified validation set and type count .
validationSet
ValidationSet
typeCount
int