tags:

views:

11

answers:

1
function CheckDateEmpty(oSrc,args)
{
    var editor = $find("<%=editorContent.ClientID%>");
    var value = editor.get_content();
    if (value == "")
    {
    args.IsValid = false; 
    return;
    }
    else
    {
        editor.set_content(value);
        args.IsValid = true; 
        return;
    }

}

the above function check perfectly weather the html editor is empty or not....but if i'll enter space in my editor ...it consider it as a value ...i want it validate for the space...

A: 

Using a regex, check if all characters are whitespaces:

if (value.match(/^\s*$/))
Kobi