form validates for empty fields and for select a category