fixed syntax error in length validation