You can apply below code :
<asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"></asp:textbox>
<asp:regularexpressionvalidator display="Dynamic" controltovalidate="TextBox1" id="RegularExpressionValidator3" validationexpression="^[\s\S]{5,10}$" runat="server" errormessage="Minimum 5 and Maximum 10 characters required." xmlns:asp="#unknown"></asp:regularexpressionvalidator>