I have a solution for the first problem for you . ie., checking out if length is 12 characters long.
Say if u have a txt box labeled "txtuserid" and a label to display error "lblError"
u can use the following function in java script to check the length and display error if the length is less than 12.
<head>
<script language="javascript" type="text/javascript">
function validateElements()
{
var username=document.getElementById('txtuserid').value;
if(username.length<12)
{
document.getElementById('lblError').innerText="Userid Less than 12 characters";
return false;
}
}
</script>
</head>
for the next requirement of yours ie., for checking if it is 6 letters followed by 6 numbers, i suggest that u can use the regular expression validator control and get the text box validated.
cheers,
saradha