You can also use regular expressions to validate user input. For example, the following piece of code only accepts three seven digit numbers:
do {
$result = Read-Host "3-7-digit number"
$result = $result.Trim("0")
$result = Read-Host "3-7-digit number"
$result = $result.Trim("0")
} while ($result -notmatch '^\d{3,7}$')
"Entered: $result"