我有一个RadEditor
,我正在尝试添加一个CustomValidator
,如下所示:
protected override void OnInit(EventArgs e)
{
var validator = new CustomValidator();
validator.CssClass = "validator-error";
validator.Display = ValidatorDisplay.Dynamic;
validator.ControlToValidate = ".";
validator.Text = "You've exceeded the maximum allowed length for this field";
validator.ClientValidationFunction = "radEditorCheckLength";
this.Controls.Add(validator);
base.OnInit(e);
}
效果很好,但是当它呈现时,验证器实际上是在RadEditor
. 如何让它出现在RadEditor
元素之前?