0
RadEditorが空でないことをチェックするようにカスタムバリデーターを変更するか、brやpタグなどのHTMLタグが含まれているだけではありません。ちょうどHTMLタグ。私は何をしたいのですか?カスタムオーダーについて
<asp:CustomValidator runat="server" ID="CustomValidator1" ControlToValidate="RadEditor1" ClientValidationFunction="checkLength">* The text length should not exceed 50 symbols.</asp:CustomValidator>
<script type="text/javascript">
var limitNum = 50;
function checkLength(sender, args)
{
//Note that sender is NOT the RadEditor. sender is the <span> of the validator.
//The content is contained in the args.Value variable
var editorText = args.Value;
args.IsValid = editorText.length < limitNum;
}
RadEditorで必要なフィールドバリデーターを使用すると、brタグが値として格納され、検証が失敗します。だから、エディタがHTMLタグしか持たないことをチェックするカスタムバリデータを書くにはどうしたらいいですか? jQueryのを使用して
お試しください..thnx – Serenity