add feature for validate an input