Subtext.Web.UI.Controls.PostComment.LastDitchValidation C# (CSharp) Method

LastDitchValidation() private method

private LastDitchValidation ( ) : void
return void
        private void LastDitchValidation()
        {
            //The validation controls and otherwise should catch everything.
            //This is here to be extra safe.
            //Anything triggering these exceptions is probably malicious.
            if (this.tbComment.Text.Length > 4000
                || this.tbTitle.Text.Length > 128
                || this.tbEmail.Text.Length > 128
                || this.tbName.Text.Length > 32
                || this.tbUrl.Text.Length > 256)
                throw new InvalidOperationException("Sorry, but we cannot accept this comment.");
        }