Form validation for add functionality