0
You can do this with JQuery
$(function(){
$("input[id$='txtTest']").bind('keypress', function(){
if($(Your Regex Comparison with TextBox value)
$("[id$='message']").text('correct your input. it should be in form of : ');
else
$("[id$='message']").text('');
});
});
Mark it as accepted if it works for you!