so are you not able to validate on Server side? Because you are validating from DB so you have to validate from server side.
<asp:CustomValidator runat="server" id="cusCustom" controltovalidate="txtCustom" onservervalidate="cusCustom_ServerValidate" errormessage="Error message!" />
protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
if(
e.IsValid = true;
else
e.IsValid = false;
}