validating form's text fields and deleting unnecessary view's files