input trimming, minimum length requirement