Added some validation/sanitization for the form values