Is it possible to get and control a validation group using javascript? I was able to validate ASPxHtmlEditor
if empty or not, but i need to control the validation group. I'm using .net 2.0.
EDITS [04202011]
I need to make ASPxHtmlEditor
a required field. I'm using an older version (10.1.6.0) of DevEx (can't update right now), but there is no validation settings for it. I used javascript to validate the editor
function validateEmptyEditor(html)
{
html = html.replace(' ', '');
html = html.replace('<br />', '');
if (html.length < 1)
{
return false;
}
else
{
return true;
}
}
I invoked the function in LostFocus
of ASPxHtmlEditor.ClientSideEvents
and is working properly. But my page uses validation group for saving. So I need to manipulate validation group when validateEmptyEditor
is invoked. Is it possible to control validation group?
If I understand your task properly, you would like to know, whether the controls residing in the ValidationGroup are passing validation or not. If so, this can be done using the following js code:
Does this help?