Check user input before save