added required field validators, clear button logic.