added another method of specifying what is/isn't allowed in the text field