Added basic automatic validation of form fields - required fields will throw an error if they are empty