///<summary>Validate event function.</summary>
 public virtual void OnValidate(ValidatingSerializerEventArgs e)
 {
     if (Validation != "")
     {
         e.Checking
         .GetType()
         .GetMethod(Validation, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
         .Invoke(e.Checking, new object[] { this, e });
     }
     else
     {
         e.Error = (Check(e.Value))?null:new ErrorInfo(this, e.Field);
     }
 }
        /// <summary>Loops through the Validator attributes provided.</summary>
        public static void Validate(IValidatingSerializer I, MemberInfo M, ValidatingSerializerEventArgs e)
        {
            ArrayList V = new ArrayList();

            V.AddRange(M.GetCustomAttributes(typeof(ValidatorAttribute), true));
            V.Sort();
            foreach (ValidatorAttribute A in V)
            {
                A.OnValidate(e);
                I.AddError(e.Error);
                if (I.Errors != null && I.Errors.Count > 0)
                {
                    break;
                }
            }
        }