Suggest you to use a Custom validator control if you intent to use a single control for regular expression as well as Required value to be validated. Try something like below.
<asp:CustomValidator ID="CustomValidator1" ValidateEmptyText="true" ClientValidationFunction="ClientValidation"
ControlToValidate="TextBox1" OnServerValidate="ServerValidation" runat="server" ErrorMessage="Errorrrr"></asp:CustomValidator
>
Add Clientside script as
<script lang="javascript" type="text/javascript">
function ClientValidation(source, arguments) {
alert("Hi");
if ((arguments.Value % 2) == 0 && arguments.Value >0)
arguments.IsValid = true;
else
arguments.IsValid = false;
}
</script>
Add a server side method for cross check if needed .
public void ServerValidation (object source, ServerValidateEventArgs arguments)
{
if(!string.IsNullOrEmpty(arguments.Value))
{
int i = int.Parse(arguments.Value);
arguments.IsValid = ((i%2) == 0);
}
else
{
arguments.IsValid = false;
}
}
Hope this helps