Valiadate txt field (at least 3 chars)

Hi guys, I would like to validate my textfield. I know the basic of this (meaning i already no how to detect no value) but now i would liek to make sure the user inputs at least 3 characters before going ot the search page. Also what woudl be just perfect is if I can make sure the user doens’t type dummy text (meaning zzz,sdjoisdj,dsajhdad) But I’m not sure if that is possible. Thanks for the input guys

in Flash?


if(myTextBox.length > 3){
// ....Do this...
}
else
{
// ....Don't do it...
}

ty