Instructions
Click the
Submit
button below the editor or the
Save
toolbar button to validate the editor content.
Format
Normal
Formatted
Address
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Numbered List
Bulleted List
Directory List
Menu List
Definition Term
Definition
Format
Font
Arial
Arial Black
Comic Sans MS
Courier
Courier New
Fixedsys
Georgia
Impact
Lucida Console
Lucida Sans Unicode
MS Sans Serif
MS Serif
Marlett
Modern
Palatino Linotype
Roman
Script
Small Fonts
Symbol
System
Tahoma
Terminal
Times New Roman
Trebuchet MS
Verdana
Webdings
Wingdings
Font
Size
1 (8 pt)
2 (10 pt)
3 (12 pt)
4 (14 pt)
5 (18 pt)
6 (24 pt)
7 (36 pt)
Size
Description
You can
validate
the UltimateEditor control on the client-side
before the page is submitted
to ensure that
the user enters content in it.
All you need is to add a
CustomValidator
control, which comes with .NET Framework, to your page
and set its
ControlToValidate
property to the
ID
of your UltimateEditor control and
ClientValidationFunction
property to the custom client-side script function used for validation as follows:
<
asp:CustomValidator
id=
"CustomValidator1"
runat=
"server"
ErrorMessage=
"* Please fill in the editor content."
ControlToValidate=
"UltimateEditor1"
ClientValidationFunction=
"ClientValidate"
/>
You can define the custom client-side script function by checking whether the editor content is empty.
You can also call the
Page_ClientValidate
method on the client-side for the toolbar items having their
PostBackValue
property set such as the
Save
button in order to validate the editor content on the client-side.