added trimming of values before validation & onChange validation for empty fields