form validation for administrator when adding/editing department and adding/editing users