If your intention is to validate only the leading space try the indexOf method in Javascript
Something like below
function CheckLeadingSpace()
{
var txt= document.getElementById('txtBoxID');
var n=txt.value.indexOf(" ",0);
if (n == 0) {
alert("InValid");
return false;
}
return true;
}
Try this on TextBox onblur or keyup event etc.
Hope this helps...