If you are using Asp.net Validation Controls, then use the RegularExpressionValidator so that the validation can be done on the single click on same time.
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ControlToValidate="TextBox1" ValidationExpression="\d{5}-\d{7}-\d{1}"> </asp:RegularExpressionValidator>