That's because the required validator is only called on submit, and the type=button is not a submit. Try this (http://jsfiddle.net/upgradellc/vrTLw/):
<form id="form1" runat="server">
<input id="q" required />
<input id="btn" type="submit" value="Search">
</form>