Form Validation

Added code to allow the saving of data after checking form fields for
valid data.