adding support for input required and custom empty string